Declaration file required for Typescript
To use tribute withing Typescript - it is required to have a Declaration File. (tributejs.d.ts)
Can you please provide one?
I don't use Typescript, so any help or direction on this would be much appreciated. This would be a great addition. Thanks!
any update on this? :)
@BorntraegerMarc Thanks for checking in! I'm not quite sure how to write a typing but it doesn't seem too complicated. I can take a stab at it.
Thanks. Let me know if you need help
Since TypeScript 1.8, it's allowed to include .js files with --allowJs flag.
See https://blogs.msdn.microsoft.com/typescript/2016/01/28/announcing-typescript-1-8-beta/
Set "compilerOptions": { "allowJs": true },
depending on your project structure include tribute library: "include": ["node_modules/tributejs/dist/tribute.js"],
now you can use Tribute, just add import {default as Tribute} from 'tributejs/dist/tribute';
Yes @TetianaP but it would be cool to have some definitely typed support for codin :)
@TetianaP @BorntraegerMarc I've added a PR that adds a typings file to the project. Let me know if I need to make any changes! https://github.com/zurb/tribute/pull/59
@mrsweaters left my comments in the PR. Thx!
Merged! https://github.com/zurb/tribute/pull/59
Sorry to come back at you this late but wouldn't it make more sense to publish the typings here https://github.com/DefinitelyTyped/DefinitelyTyped ?
I thought this would be standard practice...
@BorntraegerMarc Ah, good call. I'll be sure to add this to the DefinitelyTyped repo.