-
-
Notifications
You must be signed in to change notification settings - Fork 16
Closed
Description
Hi. Thanks for your work on integrating Ableton Link in node.js. The Typescript definitions in this repository seem invalid, as newer TSC's raise some errors while building the typescript code. I'm not able to figure out the correct synax for these as the implementations itself are mostly done in C++, and i have no experience with native node.js bindings. Maybe someone knows how to get the typescript definitions working with newer TSC versions.
The errors are as follows:
node_modules/abletonlink/index.d.ts:2:30 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
2 export const Audio = class AbletonLinkAudio extends AbletonLinkBase {}
~~~~~~~~~~~~~~~~
node_modules/abletonlink/index.d.ts:3:3 - error TS2309: An export assignment cannot be used in a module with other exported elements.
3 export = class AbletonLink extends AbletonLinkBase {}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/abletonlink/index.d.ts:3:18 - error TS2714: The expression of an export assignment must be an identifier or qualified name in an ambient context.
3 export = class AbletonLink extends AbletonLinkBase {}
~~~~~~~~~~~
node_modules/abletonlink/index.d.ts:9:1 - error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.
9 abstract class AbletonLinkBase {
~~~~~~~~
Reproducing is simple:
- Create a new blank node.js project (
$ npm init) - Install
abletonlinkandtypescript($ npm install abletonlink typescript) - Add a simple tsconfig.json file:
{ "compilerOptions": { "target": "es6", "module": "commonjs", "outDir": "./dist/server", "strict": true, "sourceMap": true, "typeRoots": [ "node_modules/@types" ] }, "exclude": [ "dist", "node_modules" ] } - Run
$ tsc - TSC will now return the errors listed above.
tbazin
Metadata
Metadata
Assignees
Labels
No labels