Skip to content

Conversation

@MichaelBuerge
Copy link
Contributor

@MichaelBuerge
Copy link
Contributor Author

The added dev dependency on @types/webgl2 is to let tsc know about WebGL2RenderingContext appearing in
https://github.com/mrdoob/three.js/blob/dev/src/renderers/webgl/WebGLAnimation.d.ts
https://github.com/mrdoob/three.js/blob/dev/src/renderers/webgl/WebGLAttributes.d.ts
https://github.com/mrdoob/three.js/blob/dev/src/renderers/webgl/WebGLUtils.d.ts

Not sure what the status is of these.
They were not passed to tsc before, as the previous entry point was src/Three.d.ts (which doesn't include the above files), whereas now all TS files are run through tsc.

@gkjohnson
Copy link
Collaborator

Not sure what the status is of these.
They were not passed to tsc before, as the previous entry point was src/Three.d.ts (which doesn't include the above files), whereas now all TS files are run through tsc.

Those files are included by renderers/WebGLRenderer.d.ts, though? Does tsc not recursively validate the files?

@MichaelBuerge
Copy link
Contributor Author

Not sure what the status is of these.
They were not passed to tsc before, as the previous entry point was src/Three.d.ts (which doesn't include the above files), whereas now all TS files are run through tsc.

Those files are included by renderers/WebGLRenderer.d.ts, though?

No they're not. WebGLRenderer.js yes, but not WebGLRenderer.d.ts.
Furthermore, the include of WebGLUtils.d.ts in src/Three.d.ts is commented out :

//export * from './renderers/webgl/WebGLUtils';

Does tsc not recursively validate the files?

Yes it does. Though only the ones it gets to from the entry points. The entry point was src/Three.d.ts, which due to the commented import left out the files I mentioned.

@Mugen87
Copy link
Collaborator

Mugen87 commented Sep 13, 2019

Looks good! I think we should give this a try 👍

@mrdoob mrdoob added this to the r109 milestone Sep 16, 2019
@mrdoob mrdoob merged commit a44f5ae into mrdoob:dev Sep 16, 2019
@mrdoob
Copy link
Owner

mrdoob commented Sep 16, 2019

Thanks!

@MichaelBuerge
Copy link
Contributor Author

Thanks!

You're welcome!

@MichaelBuerge MichaelBuerge deleted the examples-typings branch September 16, 2019 09:47
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

Successfully merging this pull request may close these issues.

4 participants