Skip to content

Commit c99473a

Browse files
committed
fix: resolve TypeScript spread argument error in raw.ts
- Destructure getCompatProp result instead of spreading - Add explicit type assertion for tuple [string, string] - Fixes ts(2556) error about spread arguments
1 parent b0b403f commit c99473a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/core/raw.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ function raw(app: any, serviceName: string, esVersion: string) {
5050
.service('aka')
5151
.raw('indices.getMapping', {})
5252
.then((results: any) => {
53-
expect(results).to.have.nested.property(...getCompatProp(mappings, esVersion))
53+
const [path, value] = getCompatProp(mappings, esVersion) as [string, string]
54+
expect(results).to.have.nested.property(path, value)
5455
})
5556
})
5657

0 commit comments

Comments
 (0)