Skip to content

Commit 1e8890c

Browse files
sxzzzhiyuanzmj
andauthored
feat: enable noCheck for dts (#752)
Co-authored-by: gaokefei <260480378@qq.com>
1 parent 037079f commit 1e8890c

File tree

9 files changed

+225
-224
lines changed

9 files changed

+225
-224
lines changed

docs/.vitepress/theme/Layout.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ provide('toggle-appearance', async ({ clientX: x, clientY: y }: MouseEvent) => {
3434
)}px at ${x}px ${y}px)`,
3535
]
3636
37-
// @ts-expect-error
3837
await document.startViewTransition(async () => {
3938
isDark.value = !isDark.value
4039
await nextTick()

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"type": "module",
88
"author": "三咲智子 <sxzz@sxzz.moe>",
99
"scripts": {
10-
"build": "pnpm run --filter=\"./packages/*\" --stream build",
10+
"build": "pnpm run --filter=\"./packages/*\" --parallel build",
1111
"dev": "pnpm run --filter=\"./packages/*\" --parallel dev",
1212
"clean": "rimraf packages/*/dist",
1313
"docs:dev": "pnpm run -C ./docs dev",

packages/volar/src/export-expose.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { createFilter } from '@vue-macros/common'
22
import { allCodeFeatures, type Code, type Sfc } from '@vue/language-core'
33
import { replace, replaceSourceRange } from 'muggle-string'
4-
import { addCode, getStart, type VueMacrosPlugin } from './common'
4+
import { addCode, getStart, getText, type VueMacrosPlugin } from './common'
55

66
function transform(options: {
77
codes: Code[]
@@ -26,20 +26,20 @@ function transform(options: {
2626

2727
exportMap.set(
2828
[
29-
propertyName.escapedText!,
29+
getText(propertyName, options),
3030
'scriptSetup',
3131
getStart(propertyName, options),
3232
allCodeFeatures,
3333
],
3434
[
35-
name.escapedText!,
35+
getText(name, options),
3636
'scriptSetup',
3737
getStart(name, options),
3838
allCodeFeatures,
3939
],
4040
)
4141

42-
exposed[name.escapedText!] = propertyName.escapedText!
42+
exposed[getText(name, options)] = getText(propertyName, options)
4343
})
4444

4545
if (stmt.moduleSpecifier) {
@@ -72,7 +72,7 @@ function transform(options: {
7272
'scriptSetup',
7373
end,
7474
end,
75-
`;[${stmt.exportClause.name.escapedText!}];`,
75+
`;[${getText(stmt.exportClause.name, options)}];`,
7676
)
7777
}
7878
} else if (
@@ -91,22 +91,22 @@ function transform(options: {
9191
if (!decl.name) continue
9292

9393
if (ts.isIdentifier(decl.name)) {
94-
const name = decl.name.escapedText!
94+
const name = getText(decl.name, options)
9595
exposed[name] = name
9696
} else if (ts.isObjectBindingPattern(decl.name)) {
9797
decl.name.elements.forEach((element) => {
9898
if (!ts.isIdentifier(element.name)) return
9999

100-
exposedValues.push(element.name.escapedText!)
101-
exposed[element.name.escapedText!] =
100+
exposedValues.push(getText(element.name, options))
101+
exposed[getText(element.name, options)] =
102102
element.propertyName && ts.isIdentifier(element.propertyName)
103-
? element.propertyName.escapedText!
104-
: element.name.escapedText!
103+
? getText(element.propertyName, options)
104+
: getText(element.name, options)
105105
})
106106
}
107107
}
108108
} else if (stmt.name && ts.isIdentifier(stmt.name)) {
109-
const name = stmt.name.escapedText!
109+
const name = getText(stmt.name, options)
110110
exposed[name] = name
111111
}
112112

playground/vue2/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"rollup": "^4.20.0",
2727
"rollup-plugin-esbuild": "^6.1.1",
2828
"type-fest": "^4.24.0",
29-
"typescript": "~5.5.4",
29+
"typescript": "catalog:",
3030
"unocss": "^0.62.2",
3131
"unplugin-vue-macros": "workspace:*",
3232
"vite": "catalog:",

playground/vue3/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"rollup": "^4.20.0",
2727
"rollup-plugin-esbuild": "^6.1.1",
2828
"type-fest": "^4.24.0",
29-
"typescript": "~5.5.4",
29+
"typescript": "catalog:",
3030
"unocss": "^0.62.2",
3131
"unplugin-vue": "^5.0.5",
3232
"unplugin-vue-macros": "workspace:*",

0 commit comments

Comments
 (0)