Skip to content

[BUG] typescript-rxjs generated code compile failed #5425

@rainmanhhh

Description

@rainmanhhh

typescript-rxjs
typescript compiler(3.8.2) reports error

Type '"" | ((name?: string | undefined, scopes?: string[] | undefined) => string) | undefined' is not assignable to type '((name: string, scopes?: string[] | undefined) => string) | unde
fined'.
  Type '""' is not assignable to type '((name: string, scopes?: string[] | undefined) => string) | undefined'.  TS2322

how to fix:
in runtime.mustache
line: 39

return apiKey && (typeof apiKey === 'function' ? apiKey : () => apiKey);

change to

return apiKey ? (typeof apiKey === 'function' ? apiKey : () => apiKey) : undefined;

line: 44

return accessToken && (typeof accessToken === 'function' ? accessToken : () => accessToken);

change to

return accessToken ? (typeof accessToken === 'function' ? accessToken : () => accessToken) : undefined;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions