Comparing version 1.6.2 to 1.6.3
@@ -1,2 +0,2 @@ | ||
export type Dict<T = any, K extends string = string> = { | ||
export type Dict<T = any, K extends string | symbol = string> = { | ||
[key in K]: T; | ||
@@ -3,0 +3,0 @@ }; |
{ | ||
"name": "cosmokit", | ||
"description": "A collection of common utilities", | ||
"version": "1.6.2", | ||
"version": "1.6.3", | ||
"sideEffects": false, | ||
@@ -9,8 +9,8 @@ "type": "module", | ||
"module": "lib/index.mjs", | ||
"typings": "lib/index.d.ts", | ||
"types": "lib/index.d.ts", | ||
"exports": { | ||
".": { | ||
"types": "./lib/index.d.ts", | ||
"require": "./lib/index.cjs", | ||
"import": "./lib/index.mjs", | ||
"types": "./lib/index.d.ts" | ||
"import": "./lib/index.mjs" | ||
}, | ||
@@ -44,15 +44,15 @@ "./package.json": "./package.json" | ||
"@sinonjs/fake-timers": "^6.0.1", | ||
"@types/chai": "^4.3.14", | ||
"@types/chai": "^4.3.16", | ||
"@types/mocha": "^9.1.1", | ||
"@types/node": "^20.11.30", | ||
"@types/node": "^22.1.0", | ||
"@types/sinonjs__fake-timers": "^6.0.4", | ||
"c8": "^7.14.0", | ||
"chai": "^4.4.1", | ||
"chai": "^5.1.1", | ||
"dtsc": "^3.0.4", | ||
"esbuild": "^0.18.20", | ||
"esbuild": "^0.23.1", | ||
"esbuild-register": "^3.5.0", | ||
"mocha": "^9.2.2", | ||
"shx": "^0.3.4", | ||
"typescript": "^5.4.3" | ||
"typescript": "^5.5.3" | ||
} | ||
} |
@@ -24,3 +24,3 @@ import { isNullable } from './misc' | ||
export function remove<T>(list: T[], item: T) { | ||
const index = list.indexOf(item) | ||
const index = list?.indexOf(item) | ||
if (index >= 0) { | ||
@@ -27,0 +27,0 @@ list.splice(index, 1) |
@@ -1,2 +0,2 @@ | ||
export type Dict<T = any, K extends string = string> = { [key in K]: T } | ||
export type Dict<T = any, K extends string | symbol = string> = { [key in K]: T } | ||
export type Get<T extends {}, K> = K extends keyof T ? T[K] : never | ||
@@ -3,0 +3,0 @@ export type Extract<S, T, U = S> = S extends T ? U : never |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65144
1173