Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tinkoff/dippy

Package Overview
Dependencies
Maintainers
16
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinkoff/dippy - npm Package Compare versions

Comparing version 0.8.5 to 0.8.6

lib/createContainer/createContainer.test-types.d.ts

19

lib/Container.d.ts
import type { RecordProvide } from './Container.h';
import type { Provider, ProviderDeps, ProvideDepsIterator } from './Provider';
import type { ExtractDependencyType, OptionalTokenDependency, TokenInterface } from './createToken/createToken';
import type { BaseTokenInterface, MultiTokenInterface, OptionalTokenDependency } from './createToken/createToken';
/**

@@ -16,6 +16,4 @@ * Маркер, который указывает, что значение еще не создано. Для проверки по ссылке.

constructor(additionalProviders?: Provider[], fallback?: Container);
get<T extends TokenInterface<unknown>>(token: T): ExtractDependencyType<T>;
get<T extends OptionalTokenDependency<unknown>>(obj: T): ExtractDependencyType<T['token']> | null;
get<T>(obj: {
token: T;
token: BaseTokenInterface<T>;
optional: true;

@@ -25,3 +23,3 @@ multi?: false;

get<T>(obj: {
token: T;
token: BaseTokenInterface<T>;
optional?: false;

@@ -31,11 +29,14 @@ multi?: false;

get<T>(obj: {
token: T;
token: MultiTokenInterface<T>;
optional: true;
multi: true;
multi?: true;
}): T[] | null;
get<T>(obj: {
token: T;
token: MultiTokenInterface<T>;
optional?: false;
multi: true;
multi?: true;
}): T[];
get<T>(token: BaseTokenInterface<T>): T;
get<T>(token: MultiTokenInterface<T>): T[];
get<T>(obj: OptionalTokenDependency<T>): T | null;
get<T>(token: T): T;

@@ -42,0 +43,0 @@ getOfDeps<T extends ProviderDeps>(deps: T): ProvideDepsIterator<T>;

@@ -45,5 +45,8 @@ import type { TokenType, TokenOptions } from './createToken.h';

export declare type ExtractTokenType<Token extends TokenInterface<unknown>> = Token extends TokenInterface<infer Type> ? Type : unknown;
export declare type ExtractDependencyType<Token extends TokenInterface<unknown>> = [Token] extends [
MultiTokenInterface<infer Type>
] ? Type[] : Token extends BaseTokenInterface<infer Type> ? Type : unknown;
declare const secret: unique symbol;
declare type Secret = typeof secret;
declare type Not<T extends boolean> = T extends true ? false : true;
declare type IsNever<T> = [T] extends [never] ? true : false;
declare type IsAny<T> = [T] extends [Secret] ? Not<IsNever<T>> : false;
export declare type ExtractDependencyType<Token extends TokenInterface<unknown>> = IsAny<Token> extends true ? any : [Token] extends [MultiTokenInterface<infer Type>] ? Type[] : Token extends BaseTokenInterface<infer Type> ? Type : unknown;
export declare type OptionalTokenDependency<Type> = {

@@ -50,0 +53,0 @@ token: TokenInterface<Type>;

{
"name": "@tinkoff/dippy",
"version": "0.8.5",
"version": "0.8.6",
"initialVersion": "0.7.27",

@@ -5,0 +5,0 @@ "description": "",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc