mirror of
https://github.com/swc-project/swc.git
synced 2024-12-24 14:16:12 +03:00
18 lines
330 B
TypeScript
18 lines
330 B
TypeScript
|
//@jsx: react
|
||
|
//@module: commonjs
|
||
|
|
||
|
//@filename: modules.d.ts
|
||
|
declare module 'mod' {
|
||
|
var y: any;
|
||
|
export default y;
|
||
|
}
|
||
|
|
||
|
//@filename: app.tsx
|
||
|
import Main from 'mod';
|
||
|
declare var Foo, React;
|
||
|
// Should see mod_1['default'] in emit here
|
||
|
<Foo handler={Main}></Foo>;
|
||
|
// Should see mod_1['default'] in emit here
|
||
|
<Foo {...Main}></Foo>;
|
||
|
|