Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
fregante merged 10 commits intomasterfromtypescript-numba-juan
Oct 6, 2020
Merged

Convert to TypeScript#64

fregante merged 10 commits intomasterfromtypescript-numba-juan
Oct 6, 2020

Conversation

@fregante
Copy link
Collaborator

@fregantefregante commentedOct 1, 2020
edited
Loading

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:

  source/features/view-markdown-source.tsx:83:2  ✖  83:2   This assertion is unnecessary since it does not change the type of the expression.  @typescript-eslint/no-unnecessary-type-assertion  ✖  84:9   This assertion is unnecessary since it does not change the type of the expression.  @typescript-eslint/no-unnecessary-type-assertion  source/features/restore-file.tsx:53:17  ✖  53:17  This assertion is unnecessary since it does not change the type of the expression.  @typescript-eslint/no-unnecessary-type-assertion

On code likedom! = memoizedFunction(), but dropping the! causes TypeScript to fail.

It's probably breaking, let's merge#59 first before publishing a new version

@fregantefregante marked this pull request as ready for reviewOctober 1, 2020 03:00
@fregantefregante mentioned this pull requestOct 1, 2020
@fregante
Copy link
CollaboratorAuthor

@BendingBender@nickytonline could you take a look at the types if you're familiar withmem?

@sindresorhussindresorhus changed the titleConvert to TypeScriptConvert to TypeScript and require Node.js 10Oct 1, 2020
@owenallenaz
Copy link
Contributor

owenallenaz commentedOct 2, 2020
edited
Loading

Lol... I was just working on merging my stuff in and was restoring the tsd file, I'm almost done and will PR shortly.

fregante reacted with laugh emojifregante reacted with heart emoji

@owenallenaz
Copy link
Contributor

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_ to cause it to not trigger unused var errors (which were everywhere in the tsd stuff). I also moved the tsd tests into a type_tests folder, this way we can get it out of dist and unwind some of the awkwardness you had to do to add it back in.

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.

fregante reacted with thumbs up emoji

@fregante
Copy link
CollaboratorAuthor

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.

@fregantefregante marked this pull request as draftOctober 3, 2020 08:08
@fregantefregante changed the titleConvert to TypeScript and require Node.js 10Convert to TypeScriptOct 6, 2020
@nickytonline
Copy link

I’ll take a peek at this this week.

fregante reacted with heart emoji

@fregantefregante mentioned this pull requestOct 6, 2020
@fregantefregante marked this pull request as ready for reviewOctober 6, 2020 06:23
@fregante
Copy link
CollaboratorAuthor

fregante commentedOct 6, 2020
edited
Loading

  • No tests had to be changed
  • AVA tests pass
  • Type tests pass
  • Refined GitHub builds without issue

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

nickytonline reacted with hooray emoji

@fregantefregante merged commit0b5c364 intomasterOct 6, 2020
@fregantefregante deleted the typescript-numba-juan branchOctober 6, 2020 06:29
@fregantefregante restored the typescript-numba-juan branchOctober 6, 2020 06:29
@fregantefregante deleted the typescript-numba-juan branchOctober 6, 2020 06:29
@fregantefregante restored the typescript-numba-juan branchOctober 6, 2020 06:29
@fregantefregante deleted the typescript-numba-juan branchOctober 6, 2020 06:29
@fregantefregante restored the typescript-numba-juan branchOctober 6, 2020 06:30
@fregantefregante deleted the typescript-numba-juan branchOctober 6, 2020 06:30
@fregantefregante restored the typescript-numba-juan branchOctober 6, 2020 06:30
@fregantefregante deleted the typescript-numba-juan branchOctober 6, 2020 06:40
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Convert tests to TypeScript

4 participants

@fregante@owenallenaz@nickytonline

[8]ページ先頭

©2009-2025 Movatter.jp