Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork54
Convert to TypeScript#64
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
45ceadc to5ff545eCompareee997c3 to902983aCompare@BendingBender@nickytonline could you take a look at the types if you're familiar with |
owenallenaz commentedOct 2, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Lol... I was just working on merging my stuff in and was restoring the tsd file, I'm almost done and will PR shortly. |
Alright PR created in#66 that includes the newer updates placed onto the TS branch. Ran into a bunch of awkward issues that took way longer than they should to correct. Mainly I didn't know you can prefix a var with One thing that still seems off is that the dist folder contains the compiled test files. According to the ava docs (https://github.com/avajs/ava/blob/HEAD/docs/recipes/typescript.md) they mention using ts-node that way you don't have to precompile the test files and therefore they don't end up in dist. |
Precompiling tests seems to be the preferred way:https://github.com/avajs/ava/blob/master/docs/recipes/typescript.md In fact I copied the config from one of AVA's modules:https://github.com/avajs/cooperate/blob/1d82c6cb09dfdc426ce75c6d634a3c863b897af4/package.json#L16-L18 I also wish AVA could just read .ts files with ts-node, but I found that it introduces more problems. |
nickytonline commentedOct 6, 2020
I’ll take a peek at this this week. |
fregante commentedOct 6, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
For all intents and purposes, this PR doesn't bring any breaking changes and is a good starting point for further PRs. For this reason, I'll merge it and types improvements can still follow before the next release, perhaps in#66 |
Uh oh!
There was an error while loading.Please reload this page.
Related:#63
Fixes#62
Background about the types:#63 (comment)
Outdated details
I tested this on Refined GitHub. TypeScript worked fine, but XO started complaining about:
On code like
dom! = memoizedFunction(), but dropping the!causes TypeScript to fail.It's probably breaking, let's merge#59 first before publishing a new version