Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declaring Internal Use Items #1

Open
ycw opened this issue Feb 18, 2022 · 0 comments
Open

Declaring Internal Use Items #1

ycw opened this issue Feb 18, 2022 · 0 comments

Comments

@ycw
Copy link
Owner

ycw commented Feb 18, 2022

cross track: three-types/three-ts-types#172

Option 1 most accurate typing (three-ts-types goals)

threejs api docs as SSOT, make sure all (three.js) public APIs are documented, then (three-ts-type) its safe to include declarations for all undocumented items, and tags them @internal

tracks:

snapshots:

Option 2 just enough for the norm (will break the goals)

updates:

Option 3 most accurate intention (future)

Ask (three.js) to adopt private class field (caniuse), then (three-ts-types) in no doubt, excludes declarations for them. If (three.js) finally delivers a "std" lib, then the "core" items exposed for "std" used only should be included and tagged @internal (three-ts-types).

tracks:

Option 4 most misleading typing (current)

(three-ts-types) includes declarations for undocumented APIs w/o @internal or @remarks undocumented, imagine that:

// three-ts-types has declaration for Audio `.loop`, so one might attempt to:
audio.loop = true  
// Bugged silently, the actual source doesn't loop. After diving into the docs, 
// we realized that .loop is undocumented, and .setLoop() should be used instead.

related:

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

No branches or pull requests

1 participant