Skip to content

Commit

Permalink
chore: enable isolatedDeclarations (#2687)
Browse files Browse the repository at this point in the history
* experimental: enable isolatedDeclarations

* update typescript
  • Loading branch information
dai-shi authored Sep 15, 2024
1 parent ab68d4d commit a26203e
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 50 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/test-old-typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ jobs:
cache-dependency-path: '**/pnpm-lock.yaml'
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Patch for all TS
run: |
sed -i~ 's/"isolatedDeclarations": true,//' tsconfig.json
- name: Patch for v4/v3 TS
if: ${{ startsWith(matrix.typescript, '4.') || startsWith(matrix.typescript, '3.') }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
"ts-expect": "^1.3.0",
"ts-node": "^10.9.2",
"tslib": "^2.6.3",
"typescript": "^5.5.4",
"typescript": "^5.6.2",
"vitest": "^2.0.5",
"wonka": "^6.3.4"
},
Expand Down
94 changes: 47 additions & 47 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/babel/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function isAtom(
t: typeof types,
callee: babel.types.Expression | babel.types.V8IntrinsicIdentifier,
customAtomNames: PluginOptions['customAtomNames'] = [],
) {
): boolean {
const atomNames = [...atomFunctionNames, ...customAtomNames]
if (t.isIdentifier(callee) && atomNames.includes(callee.name)) {
return true
Expand Down
2 changes: 1 addition & 1 deletion src/vanilla/utils/constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const RESET = Symbol(
export const RESET: unique symbol = Symbol(
import.meta.env?.MODE !== 'production' ? 'RESET' : '',
)
2 changes: 2 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"noUncheckedIndexedAccess": true,
"exactOptionalPropertyTypes": true,
"verbatimModuleSyntax": true,
"declaration": true,
"isolatedDeclarations": true,
"noEmit": true,
"baseUrl": ".",
"paths": {
Expand Down

0 comments on commit a26203e

Please sign in to comment.