I'd like to make use of the static type system of TypeScript for internal implementation, but keep the API compatible with JavaScript. To be specific, write a callbackless-internal.ts, then compile it to callbackless-internal.js, keep both in the src directory. Make callbackless.js is a wrapper of the callbackless-internal.js, may add some precondition checks there.
I'd like to make use of the static type system of TypeScript for internal implementation, but keep the API compatible with JavaScript. To be specific, write a callbackless-internal.ts, then compile it to callbackless-internal.js, keep both in the src directory. Make callbackless.js is a wrapper of the callbackless-internal.js, may add some precondition checks there.