You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could the best practices (or maybe contributing) guide be updated to include recommendations on how to use promises when building a d.ts file?
We ran into this on AGBrown/pouchdb.d.ts#18 (which we are working on for DefinitelyTyped/DefinitelyTyped#4328). There are 180 files in DT that refer to Promise or Thenable (some are implementation libs for promises, others are consumers of promises), and the styles vary wildly (from referencing various promise d.ts files to redefining their own promises)
It seems like a best practice might be something like:
If the library that the d.ts is for uses a specific implementation of a promise lib, then /// that specific promise lib from inside the d.ts, and add a comment to that effect so nobody tries to change it later.
Otherwise: do not /// a promise lib inside the d.ts; make a note in the readme that the user will need to do that themselves; and /// to es6-promise.d.ts inside the -tests.d.ts file.
However, I would be interested to hear if anyone has a preferred best practice that is different to this.
The text was updated successfully, but these errors were encountered:
Could the best practices (or maybe contributing) guide be updated to include recommendations on how to use promises when building a d.ts file?
We ran into this on AGBrown/pouchdb.d.ts#18 (which we are working on for DefinitelyTyped/DefinitelyTyped#4328). There are 180 files in DT that refer to Promise or Thenable (some are implementation libs for promises, others are consumers of promises), and the styles vary wildly (from referencing various promise d.ts files to redefining their own promises)
It seems like a best practice might be something like:
///
that specific promise lib from inside the d.ts, and add a comment to that effect so nobody tries to change it later.///
a promise lib inside the d.ts; make a note in the readme that the user will need to do that themselves; and///
toes6-promise.d.ts
inside the-tests.d.ts
file.However, I would be interested to hear if anyone has a preferred best practice that is different to this.
The text was updated successfully, but these errors were encountered: