Vi100
Vi100

Reputation: 4203

TypeScript Definitions for Forge Viewer missing Profiles related typings

I'm using typescript definitions for Forge from the DefinitelyTyped repository: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/forge-viewer

but I'm missing a lot of typings, specefically those related with Profiles management:

viewer.registerProfile(...)
wiewer.setProfile(...)
constructor: Autodesk.Viewing.Profile(customProfileSettings...)
Autodesk.Viewing.ProfileSettings.AEC
Autodesk.Viewing.ProfileSettings.clone(...)

also need the function for setting FPSs:

viewer.impl.setFPSTargets(...)

I don't know how to declare them since even on the Autodesk's docs they are missing:

https://forge.autodesk.com/en/docs/viewer/v7/reference/globals/TypeDefs/ProfileSettings/

Anybody has these types of some guidance (not too generalistic) of how to implement them?

Upvotes: 1

Views: 139

Answers (1)

Xiaodong Liang
Xiaodong Liang

Reputation: 2196

Not all functions or properties are declared in type definition, while you can add them, following their definition in viewer source. e.g. for setFPSTargets, the definition in viewer source is:

enter image description here

In Type, the declare could be:

enter image description here

the functions or properties in impl are not officially released, so they have not exposed on API help document.

Upvotes: 1

Related Questions