haxiomic / dts2hx

Converts TypeScript definition files (d.ts) to haxe externs (.hx) via the TypeScript compiler API
MIT License
134 stars 9 forks source link

jsxgraph 1.4.4 lib Error: [TypeScript 3.7] Cannot find name 'XXXXX' #116

Open sonygod opened 2 years ago

sonygod commented 2 years ago

jsxgraph 1.4.4 lib Error: [TypeScript 3.7] Cannot find name 'XXXXX'

I try to convert jsxgraph lib ,got these error

> Error: [TypeScript 3.7] Cannot find name 'z'. (D:/projects/jsxgraph/node_modules/jsxgraph/distrib/index.d.ts:110:50)
> Error: [TypeScript 3.7] Cannot find name 'x'. (D:/projects/jsxgraph/node_modules/jsxgraph/distrib/index.d.ts:110:61)
> Error: [TypeScript 3.7] Cannot find name 'y'. (D:/projects/jsxgraph/node_modules/jsxgraph/distrib/index.d.ts:110:72)
> Error: [TypeScript 3.7] Cannot find name 'x'. (D:/projects/jsxgraph/node_modules/jsxgraph/distrib/index.d.ts:110:86)
> Error: [TypeScript 3.7] Cannot find name 'y'. (D:/projects/jsxgraph/node_modules/jsxgraph/distrib/index.d.ts:110:97)
> Error: [TypeScript 3.7] Cannot find name 'z'. (D:/projects/jsxgraph/node_modules/jsxgraph/distrib/index.d.ts:122:17)
....

and I try to downlevel-dts ? how to work with dts2hx?

when I put this to ./node_modules/jsxgraph/package.json

  "typesVersions": {
    "<4.0": { "*": ["ts3.4/*"] }
  }

and got this error.

   Error: Failed to find typescript for module "jsxgraph". Searched the following paths:
vladimirvelikov commented 2 years ago

Despite the errors, the externs should be present in the .haxelib directory next to the node_modules directory of your project.

You can add them via -cp .haxelib/jsxgraph/1,4,5 (1.4.5 is the current version, yours might be different).