|
| 1 | +=== tests/cases/compiler/main.ts === |
| 2 | +import MyFunction from "./MyComponent"; |
| 3 | +>MyFunction : Symbol(MyFunction, Decl(main.ts, 0, 6)) |
| 4 | + |
| 5 | +MyFunction({msg: "Hello World"}); |
| 6 | +>msg : Symbol(msg, Decl(main.ts, 2, 12)) |
| 7 | + |
| 8 | + |
| 9 | +=== tests/cases/compiler/MyComponent.ts === |
| 10 | +interface MyFunction { msg: string; } |
| 11 | +>MyFunction : Symbol(MyFunction, Decl(MyComponent.ts, 0, 0), Decl(MyComponent.ts, 2, 12)) |
| 12 | +>msg : Symbol(MyFunction.msg, Decl(MyComponent.ts, 0, 22)) |
| 13 | + |
| 14 | +export const MyFunction = ({ msg }: MyFunction) => console.log(`Got message "${msg}"`); |
| 15 | +>MyFunction : Symbol(MyFunction, Decl(MyComponent.ts, 2, 12)) |
| 16 | +>msg : Symbol(msg, Decl(MyComponent.ts, 2, 28)) |
| 17 | +>MyFunction : Symbol(MyFunction, Decl(MyComponent.ts, 0, 0), Decl(MyComponent.ts, 2, 12)) |
| 18 | +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) |
| 19 | +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) |
| 20 | +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) |
| 21 | +>msg : Symbol(msg, Decl(MyComponent.ts, 2, 28)) |
| 22 | + |
| 23 | +export default MyFunction; |
| 24 | +>MyFunction : Symbol(MyFunction, Decl(MyComponent.ts, 0, 0), Decl(MyComponent.ts, 2, 12)) |
| 25 | + |
0 commit comments