Function InjectableCompat

  • A compatibility version of Injectable for TypeScript 4 and earlier users. This function behaves identically to Injectable but requires the use of as const on the dependencies array.

    Type Parameters

    • Token extends TokenType
    • Tokens extends readonly TokenType[]
    • Params extends readonly any[]
    • Service

    Parameters

    Returns ReturnType<typeof Injectable>

    Use Injectable instead. This function is provided for compatibility with TypeScript 4 and earlier versions and will be removed in future releases.

    Injectable for detailed usage instructions and examples.