Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error TS1086: An accessor cannot be declared in an ambient context. #366

Closed
demalmar opened this issue Feb 27, 2020 · 2 comments
Closed

Comments

@demalmar
Copy link

After installing the recent version, that fixes PNG problems, I have encounter these errors:

ERROR in node_modules/pdf-lib/cjs/core/streams/Stream.d.ts:20:9 - error TS1086: An accessor cannot be declared in an ambient context.
get isEmpty(): number;
node_modules/pdf-lib/cjs/core/streams/Stream.d.ts:20:9 - error TS1086: An accessor cannot be declared in an ambient context.
get isEmpty(): boolean;

@doug-gov
Copy link

I'm recieving the same error. tried to uninstall/reinstall typescript. I am using webpack v 4.34 & typescript v 3.5.3

@Hopding
Copy link
Owner

Hopding commented Feb 29, 2020

@demalmar @doug-gov

Version 1.4.0 is now published. It contains additional TypeScript declarations for older version of TypeScript that should resolve this issue. The full release notes are available here.

You can install this new version with npm:

npm install pdf-lib@1.4.0

It's also available on unpkg:

As well as jsDelivr:

@Hopding Hopding closed this as completed Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants