Add basic TypeScript declaration files (first pass)#50
Open
singingwolfboy wants to merge 1 commit intoinukshuk:mainfrom
Open
Add basic TypeScript declaration files (first pass)#50singingwolfboy wants to merge 1 commit intoinukshuk:mainfrom
singingwolfboy wants to merge 1 commit intoinukshuk:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First attempt at fixing #49.
I'm pretty decent at writing TypeScript, but I have less experience with writing TS declaration files, and I don't know the logic of this codebase well enough to add correct annotations everywhere. Therefore, in order to make this pull request, I did the following:
singingwolfboy/edtf.ts*.jsfiles to*.ts, and added the TypeScript dependency topackage.jsonnpx tsc --declaration --emitDeclarationOnlyto make TypeScript generate the declaration files for meinukshuk/edtf.js, added a commit with those declaration files, and made this pull requestSome important caveats:
parser.js,interface.js, anddate.js. There are plenty ofanytypes in these declaration files, which can (and probably should!) be narrowed to something more specific.If you are not interested in merging this pull request as a result of the above caveats, I completely understand. My goal is to demonstrate how we might start to add types to this codebase, in the hopes of inspiring others to complete a more robust implementation. I intend to keep my fork up on GitHub, so that others can view the TypeScript annotations in the code, and maybe fork my work and continue it to completion.