Skip to content

Commit e001fa9

Browse files
committed
wip: types
1 parent f4f36a7 commit e001fa9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/doc/Document.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ export class Document<T = unknown> {
264264
* Removes a value from the document.
265265
* @returns `true` if the item was found and removed.
266266
*/
267-
delete(key: any) {
267+
delete(key: unknown) {
268268
return assertCollection(this.contents) ? this.contents.delete(key) : false
269269
}
270270

src/nodes/YAMLMap.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,20 @@ export class YAMLMap<K = unknown, V = unknown> extends Collection {
7676
}
7777
}
7878

79-
delete(key: K) {
79+
delete(key: unknown) {
8080
const it = findPair(this.items, key)
8181
if (!it) return false
8282
const del = this.items.splice(this.items.indexOf(it), 1)
8383
return del.length > 0
8484
}
8585

86-
get(key: K, keepScalar?: boolean) {
86+
get(key: unknown, keepScalar?: boolean) {
8787
const it = findPair(this.items, key)
8888
const node = it?.value
8989
return !keepScalar && isScalar(node) ? node.value : node
9090
}
9191

92-
has(key: K) {
92+
has(key: unknown) {
9393
return !!findPair(this.items, key)
9494
}
9595

0 commit comments

Comments
 (0)