-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
There is a problem when compiling files with generics on lambda-functions.
Example:
const fn = <T>(Dependency: Constructable<T>, hint?: string): T =>
ensureInjector().get(Dependency, hint);It transpiles to this:
const fn = React.createElement(
T,
null,
"(Dependency: Constructable",
React.createElement(
T,
null,
", hint?: string): T => ensureInjector().get(Dependency, hint); // function fn",
React.createElement(
T,
null,
"(Dependency: Constructable",
React.createElement(
T,
null,
", hint?: string): T ",
fn.reset = () => {
injector = void 0;
},
"; return fn; })();"
)
)
)
);When changing the function to this it works:
function fn<T>(Dependency: Constructable<T>, hint?: string): T {
return ensureInjector().get(Dependency, hint);
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels