Closed krisutofu closed 1 month ago
An additional export = X3D;
at the beginning would be important to make the definitions work with require
.
// Handle both importing via UMD and modules:
export default X3D;
export = X3D;
When I test this with vscode all is fine in both TS, ES, require.
Thank you for providing these changes.
Because a lot of .d.ts
is automatically generated I updated /build/bin/ts.js
and /src/X3DUOM.xml
in branch types
.
I created a test TS project and tested your changes with your TS config, and it seems to work. Link to branch https://github.com/create3000/x_ite/tree/types. Could you please confirm that this is now working.
This PR is already manually merged, so I will close it.
Great, thank you for your work!
Using Typescript 5.6.2, VSCode 1.93.1
These are the changes that I made to make the definitions work as I think they are intended. The only difference is, the interface has been replaced with a namespace that contains the interface instance properties and all type definitions.
Issue: #181
changes:
X3D
instance and its interfacedeclare
from namespace membersnumber?
static
on interface members<fieldProxy>
onMFNode
sX3DMaterialExtensionNodeProxy
withX3DMaterialNodeProxy
this
type withunknown
for callback function parameter.SFNode
instead ofX3DMetadataObjectProxy
orTextureProxy
(other members do not show errors)I had to edit also the autogenerated code. It is an example and therefore I made this a draft.