davidjbradshaw / iframe-resizer

Keep iFrames sized to their content.
https://iframe-resizer.com
Other
6.62k stars 977 forks source link

fixed error TS2613: Module "@iframe-resizer/parent" has no default ex… #1263

Closed pompep closed 1 month ago

pompep commented 1 month ago

…port.

davidjbradshaw commented 1 month ago

Thanks for this, looking at the child types, it has the same issue, but I”m not sure what I should be exporting in that one as it relates to the global namespace. Do you have any advice on this?

https://github.com/davidjbradshaw/iframe-resizer/blob/master/packages/child/index.d.ts

pompep commented 1 month ago

The child module exports nothing so I think the current d.ts is doing right with global Window redeclaration. As a user you just have to include this d.ts somehow e.g. by listing it in tsconfig.json

...
"include": [
        "./node_modules/@iframe-resizer/child/iframe-resizer.child.d.ts"
  ],
...
davidjbradshaw commented 1 month ago

Thank you, that’s good to know. I will merge this and get a release out for tomorrow.

davidjbradshaw commented 1 month ago

Released as v5.0.2