-
Notifications
You must be signed in to change notification settings - Fork 11
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
Typescript external support #88
Comments
ParsecJ is a good source of inspiration for type definitions: https://github.com/jon-hanson/parsecj |
package.json must reference the typings: "typings": "./masala.d.ts", The problem is that typings is obsolete, so it could move quickly. Another option is that there is a convention so that, because |
Found it: https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html In package.json: {
"name": "@masala/parser",
"main": "./src/build/index.js",
"types": "./masala.d.ts"
} |
Good news, we can make solid overloading in type definitions with Typescript: function reverse(string: string): string;
function reverse<T>(array: T[]): T[]; https://blog.mariusschulz.com/2016/08/18/function-overloads-in-typescript |
Hello. If you plan on developing the d.ts definitions APIs as part of this repository. There is a way to do so, while also ensuring that the APIs match the implemntation See: https://github.com/bd82/typescript_for_public_apis |
Yes, it will be a 100% pure JS lib, with a .d.ts available with |
Writing a definition file embedded in the package, implementing the @types system: https://blog.angular-university.io/typescript-2-type-system-how-do-type-definitions-work-in-npm-when-to-use-types-and-why-what-are-compiler-opt-in-types/
The text was updated successfully, but these errors were encountered: