Here’s how I setup a minimal example:
- I copied these three files distribution files into a directory:
/dist/babylon.d.ts
/dist/gltf2Interface/babylon.glTF2Interface.d.ts
/dist/loaders/babylon.glTF2FileLoader.d.ts
- Create an empty
test.ts
file in the directory. Then create atsconfig.json
with the following contents:
{
"compilerOptions": {
"target": "ES2019",
"outFile": "typescript.js",
},
"include": [
"*.ts",
],
}
- In the directory, run
tsc
. (I’ve currently got version3.8.3
.) Should see the following output:
babylon.glTF2FileLoader.d.ts:240:52 - error TS2304: Cannot find name 'IGLTFValidationResults'.
240 readonly onValidatedObservable: Observable<IGLTFValidationResults>;
~~~~~~~~~~~~~~~~~~~~~~
babylon.glTF2FileLoader.d.ts:245:32 - error TS2304: Cannot find name 'IGLTFValidationResults'.
245 onValidated: (results: IGLTFValidationResults) => void;
~~~~~~~~~~~~~~~~~~~~~~
Found 2 errors.
Workaround: For the moment I’m around this by making both lines use GLTF2.IGLTFValidationResults
rather than just IGLTFValidationResults
.
Not sure if this is a sign I’m missing something from the tsconfig.json
file or if the code just has a typo.