You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
packages/playwright-core/types/types.d.ts isn't in the src directory
The error says namespace 'Protocol', not module 'Protocol'.
Could any of this be the issue?
In any case, the generated file doesn't contain the module definition of Protocol.
Do you have any idea, why this isn't working?
The following commands reproduce the issue:
git clone https://github.com/microsoft/playwright/
cd playwright/
npm i -D dts-bundle-generator
npx dts-bundle-generator -o packages/playwright-core/bundle.d.ts packages/playwright/index.d.ts
PS: In case you are wondering, I'm trying to generate a .d.ts bundle for Playwright to generate language bindings for F# via ts2fable, which unfortunately doesn't handle re-exports (so I'd like to use dts-bundle-generator to generate a .d.ts file that ts2fable understands).
The text was updated successfully, but these errors were encountered:
The error says namespace 'Protocol', not module 'Protocol'.
This is what the compiler says. Internally "modules" are namespaces.
If you add --inline-declare-externals flag it seems to work fine. Meanwhile I'll look into why --inline-declare-externals affects such namespaces/modules.
It seems that the issue is caused by this code and changing this might be a breaking change. I'll assign the issue to the next major milestone, meanwhile please use workaround with --inline-declare-externals flag.
…quotes) and fixed wrong `export` state of references namespaces/modules
Previously, for some reason name `ModuleName` was treated the same as with quotes
i.e. it was checked whether that name should be exported.
Now every used module with such name will be inlined regardless of `--inline-declare-externals` option.
Fixes#237, #241
Hi,
I'm trying to generate a
.d.ts
bundle for Playwright, but unfortunately I get the following error message:I've read
Fixing compilation issues while using declare module or similar "global" type declarations
, and this doesn't seem to apply here (however, I haven't used TypeScript much, so I might be wrong).Protocol
seems to be defined inpackages/playwright-core/types/protocol.d.ts
:...which is imported in
packages/playwright-core/types/types.d.ts
viaimport { Protocol } from './protocol';
, which itself is re-exported frompackages/playwright-core/index.d.ts
andpackages/playwright/index.d.ts
.I've noticed two things:
packages/playwright-core/types/types.d.ts
isn't in thesrc
directorynamespace 'Protocol'
, notmodule 'Protocol'
.Could any of this be the issue?
In any case, the generated file doesn't contain the module definition of
Protocol
.Do you have any idea, why this isn't working?
The following commands reproduce the issue:
PS: In case you are wondering, I'm trying to generate a
.d.ts
bundle for Playwright to generate language bindings for F# via ts2fable, which unfortunately doesn't handle re-exports (so I'd like to usedts-bundle-generator
to generate a.d.ts
file thatts2fable
understands).The text was updated successfully, but these errors were encountered: