Invalid export in /googleapis/build/src/index.d.ts
See original GitHub issueFollowing error raises when the library is used with Loopback 4
`node_modules/googleapis/build/src/index.d.ts:5:10 - error TS1005: ‘from’ expected.
5 export * as Common from ‘googleapis-common’; ~~
node_modules/googleapis/build/src/index.d.ts:5:13 - error TS1005: ‘;’ expected.
5 export * as Common from ‘googleapis-common’; ~~~~~~
node_modules/googleapis/build/src/index.d.ts:5:20 - error TS1005: ‘;’ expected.
5 export * as Common from ‘googleapis-common’; ~~~~
node_modules/googleapis/build/src/index.d.ts:5:25 - error TS1005: ‘;’ expected.
5 export * as Common from ‘googleapis-common’; `
Environment details
1.
- OS: Windows 10 x64
- Node.js version: 12.13.1
- npm version: 6.12.1
googleapis
version: 59.0.0typescript
version: 3.7.5
2.
- OS: Ubuntu 18.04 LTS
- Node.js version: 12.10.0
- npm version: 6.14.4
googleapis
version: 59.0.0typescript
version: 3.7.5
Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:8 (5 by maintainers)
Top Results From Across the Web
TypeScript typings give me "index.d.ts is not a module"
In TypeScript, just as in ECMAScript 2015, any file containing a top-level import or export is considered a module. Conversely, a file without...
Read more >Documentation - Modules .d.ts - TypeScript
One style of exporting in CommonJS is to export a function. Because a function is also an object, then extra fields can be...
Read more >rollup-plugin-dts - npm
Exporting namespaces currently does not work and will create invalid .d.ts files. import * as ...
Read more >ae-forgotten-export - API Extractor
This message is reported when an exported API refers to another declaration that is not exported ... needs to be exported by the...
Read more >TypeScript errors and how to fix them
If you want to export a constant from a definition file ( d.ts ), then you have to use the export ... export...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Looks like this one is solved - to use this lib, you need to be using at least TypeScript 3.8.x. Sadly - there’s no way we can figure out how to express which version of TypeScript we require in a programmatic sense (peer dependencies, optional dependencies, strict engine checks, etc).
I know this answer isn’t super fulfilling, but our plan is to start gating TypeScript tooling version on semver major releases of the library (which for this library … is often.).
microsoft/TypeScript#34903 adds support for the new export * as ns from ‘specifier’ syntax, which is after
typescript@3.8
.