Skip to content

inject types error #83

@Mister-Hope

Description

@Mister-Hope

Declaration file in this lib:

export interface InjectionKey<T> extends Symbol {
}
export declare function provide<T>(key: InjectionKey<T> | string, value: T): void;
export declare function inject<T>(key: InjectionKey<T> | string, defaultValue: T): T;

Docs:

link

  • Typing
interface InjectionKey<T> extends Symbol {}

function provide<T>(key: InjectionKey<T> | string, value: T): void

// without default value
function inject<T>(key: InjectionKey<T> | string): T | undefined
// with default value
function inject<T>(key: InjectionKey<T> | string, defaultValue: T): T

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions