Skip to content
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

Prefer as const with TypeScript 4.9 introduced satisfies operator #724

Merged
merged 9 commits into from Nov 24, 2022

Conversation

kachick
Copy link
Member

@kachick kachick commented Nov 24, 2022

microsoft/TypeScript#47920
https://devblogs.microsoft.com/typescript/announcing-typescript-4-9-rc/#satisfies

This is my hope since #479 (comment)

NOTE: typescirpt-eslint has issue for false detection. It is fixed in typescript-eslint/typescript-eslint#6059, but not yer released. However we don't have the pattern. See kachick/renovate-config-asdf#415 (comment) for further detail.

@kachick
Copy link
Member Author

kachick commented Nov 24, 2022

Hmm... vite or esbuild looks having issue for this feature 🤔

@kachick
Copy link
Member Author

kachick commented Nov 24, 2022

We are using supported esbuild version 🤔

evanw/esbuild#2509

"esbuild": "^0.15.15",

@kachick
Copy link
Member Author

kachick commented Nov 24, 2022

esbuild ignores rest of as. npx esbuild src/session/Timer.tsx passes.

@kachick
Copy link
Member Author

kachick commented Nov 24, 2022

Using old babel is the cause. (Vite using babel for JSX) However roughly updating all to latest makes Jest error. This is a dependency hell 🤣

@kachick
Copy link
Member Author

kachick commented Nov 24, 2022

Failed only in netlify integration. Looks using yarn. Replaced yarn with npm in #435. 🤔

@pankona Do you know the reason? I believe deployment should use as same logics tested in CI. How about to replace with others? An example, firebase can use github actions for the deployment. Looks netlify having similar one https://github.com/marketplace/actions/netlify-actions (but this is unofficial)

@kachick
Copy link
Member Author

kachick commented Nov 24, 2022

@github-actions
Copy link
Contributor

Visit the preview URL for this PR (updated for commit 55dd1c6):

https://mobu-waiwai--pr724-prefer-as-const-with-ljxb1yh9.web.app

(expires Thu, 01 Dec 2022 15:22:47 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 295e29f2bd6fa9acc70abd1b84aec0de70cff3f6

@kachick
Copy link
Member Author

kachick commented Nov 24, 2022

Since replaced netlify with firebae, Blocker is gone.

#727

@kachick kachick marked this pull request as ready for review November 24, 2022 15:24
@kachick kachick merged commit 0d7c766 into main Nov 24, 2022
@kachick kachick deleted the prefer-as-const-with-satisfy branch November 24, 2022 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant