Skip to content

Commit

Permalink
fix: type errors in build
Browse files Browse the repository at this point in the history
  • Loading branch information
ascott18 committed Sep 20, 2024
1 parent 42b168c commit 11ce7ef
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,11 +301,8 @@ export default defineComponent({
// We need to mark the item as removed, but allow `emitInput` to handle
// actually updating the collection bound to the input.
// @ts-expect-error internal state
vm._isRemoved = true;
// @ts-ignore internal state
if (vm.$parent) {
// @ts-expect-error internal state
if (vm.$parent instanceof ViewModel) {
(vm.$parent.$removedItems ??= []).push(vm);
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/coalesce-vue-vuetify3/package-lock.json

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

4 changes: 2 additions & 2 deletions src/coalesce-vue-vuetify3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"dist"
],
"scripts": {
"build": "npm run build-local-deps && vite build && vue-tsc -p ./tsconfig.build-types.json && vue-tsc -p ./tsconfig.test-types.json && npm run buildts",
"build": "npm run build-local-deps && vite build && vue-tsc --noEmit && vue-tsc -p ./tsconfig.build-types.json && npm run buildts",
"buildts": "tsc -p ./tsconfig.build-utils.json",
"build-local-deps": "cd ../coalesce-vue && npm ci && npm run build",
"test": "vitest",
Expand Down Expand Up @@ -61,7 +61,7 @@
"eslint-plugin-vue": "^9.27.0",
"jsdom": "^24.1.1",
"sass": "^1.69.7",
"typescript": "5.3.3",
"typescript": "5.6.2",
"unplugin-vue-components": "^0.27.4",
"vite": "^5.3.4",
"vitest": "^2.0.3",
Expand Down
27 changes: 14 additions & 13 deletions src/coalesce-vue-vuetify3/tsconfig.build-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,22 @@
"outDir": "./dist",
"declaration": true,
"emitDeclarationOnly": true,

// Type checking is done according to tsconfig.json,
// which is configured to be able to use coalesce-vue internal types.

// However, we must emit the types using the build copy of coalesce-vue
// so that typescript doesn't also emit types for coalesce-vue.
// We have to turn off typechecking to do this because
// the @internal types in coalesce-vue aren't available there.
"noCheck": true,

"rootDir": "./src",
"paths": {
"coalesce-vue": ["coalesce-vue"],
"coalesce-vue/*": ["coalesce-vue/*"],
"coalesce-vue/lib/*": ["coalesce-vue/lib/*"]
"coalesce-vue": ["../coalesce-vue/lib"],
"coalesce-vue/*": ["../coalesce-vue/lib/*"],
"coalesce-vue/lib/*": ["../coalesce-vue/lib/*"]
}
},
"include": ["src/index.ts"],
"exclude": [
"node_modules",
"../coalesce-vue",
"coalesce-vue",
"coalesce-vue/**/*",
"../coalesce-vue/src",
"../coalesce-vue/src/*",
"../coalesce-vue/**/*"
]
"include": ["src/index.ts"]
}
1 change: 1 addition & 0 deletions src/coalesce-vue-vuetify3/tsconfig.build-utils.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"target": "ESNext",
"outDir": "./dist",
"declaration": true,
"skipLibCheck": true,
"moduleResolution": "NodeNext"
},
"include": ["src/build.ts"],
Expand Down
3 changes: 2 additions & 1 deletion src/coalesce-vue-vuetify3/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"coalesce-vue/*": ["../coalesce-vue/src/*"],
"coalesce-vue/lib/*": ["../coalesce-vue/src/*"],
"vue": ["node_modules/vue"],
"vue/*": ["node_modules/vue/*"]
"vue/*": ["node_modules/vue/*"],
"vue-router": ["node_modules/vue-router"]
},
"lib": ["esnext", "dom", "dom.iterable", "scripthost"],
"types": ["node", "vue-router", "vuetify", "vitest/globals"]
Expand Down
8 changes: 0 additions & 8 deletions src/coalesce-vue-vuetify3/tsconfig.test-types.json

This file was deleted.

0 comments on commit 11ce7ef

Please sign in to comment.