Skip to content

Commit 36c0196

Browse files
committed
fix: review issue
1 parent 834a9f1 commit 36c0196

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

packages/register/src/service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ export const defineService = <T, K>(serviceOptions: ServiceOptions<T, K>): Servi
5656

5757
// 使用对象展开运算符合并 apis,避免直接赋值导致类型错误
5858
if (typeof apis === 'object' && apis) {
59-
resultService.apis = { ...resultService.apis, ...apis }
59+
resultService.apis = apis as any
6060
} else if (typeof apis === 'function') {
6161
// 传递完整的 context 对象,包含 state 和 options
62-
resultService.apis = { ...resultService.apis, ...apis({ state, options }) }
62+
resultService.apis = apis({ state, options }) as any
6363
}
6464

6565
resultService.apis.setOptions = (kv) => {

tsconfig.app.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"strict": true,
66
"noUnusedLocals": true,
77
"noUnusedParameters": true,
8+
"noEmit": true,
89
"noFallthroughCasesInSwitch": true,
910
"allowJs": true,
1011
"baseUrl": "./",

0 commit comments

Comments
 (0)