mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 21:53:42 -06:00
Add test case for isolated declarations function expression issue
Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com>
This commit is contained in:
parent
8df2f7c170
commit
655637f611
@ -0,0 +1,21 @@
|
||||
// @isolatedDeclarations: true
|
||||
// @declaration: true
|
||||
|
||||
declare function observer<T>(fn: T): T;
|
||||
declare function action<T>(fn: T): T;
|
||||
|
||||
export const Component = observer(() => {
|
||||
return "hello";
|
||||
});
|
||||
|
||||
export const thing = action(function () {
|
||||
return Component;
|
||||
});
|
||||
|
||||
export const arrowWithType = observer((): string => {
|
||||
return "typed";
|
||||
});
|
||||
|
||||
export const functionWithType = action(function (): typeof Component {
|
||||
return Component;
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user