mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-15 22:15:05 -05: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:
@@ -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;
|
||||
});
|
||||
Reference in New Issue
Block a user