@types/oojs
Advanced tools
Comparing version 7.0.1 to 7.0.2
@@ -86,3 +86,3 @@ declare namespace OO { | ||
interface EmitterListConstructor { | ||
new (): EmitterList; | ||
new(): EmitterList; | ||
prototype: EmitterList; | ||
@@ -89,0 +89,0 @@ static: {}; |
@@ -101,3 +101,3 @@ declare namespace OO { | ||
interface EventEmitterConstructor { | ||
new (): EventEmitter; | ||
new(): EventEmitter; | ||
prototype: EventEmitter; | ||
@@ -104,0 +104,0 @@ static: {}; |
declare namespace OO { | ||
// HACK: Omit register and unregister because Factory changed their call signatures (!) | ||
interface Factory extends Omit<Registry, 'register' | 'unregister'> { | ||
interface Factory extends Omit<Registry, "register" | "unregister"> { | ||
/** | ||
@@ -23,3 +23,5 @@ * Register a constructor with the factory. | ||
*/ | ||
register(constructor: (ConstructorLike & { static: { name: string } }) | (ConstructorLike & { key: string })): void; | ||
register( | ||
constructor: (ConstructorLike & { static: { name: string } }) | (ConstructorLike & { key: string }), | ||
): void; | ||
@@ -72,3 +74,3 @@ /** | ||
interface FactoryConstructor { | ||
new (): Factory; | ||
new(): Factory; | ||
prototype: Factory; | ||
@@ -75,0 +77,0 @@ super: RegistryConstructor; |
{ | ||
"name": "@types/oojs", | ||
"version": "7.0.1", | ||
"version": "7.0.2", | ||
"description": "TypeScript definitions for OOjs", | ||
@@ -28,4 +28,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/oojs", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "6d4933bf442d1aa78b176e8d0a83da779325e07ed4c76f01250bdf88029f620c", | ||
"typesPublisherContentHash": "f4bdb47ea101eaaaf2663a878a3803247aa56c6da66390d51c099954894f4b41", | ||
"typeScriptVersion": "4.3" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Tue, 22 Aug 2023 18:04:34 GMT | ||
* Last updated: Sun, 03 Sep 2023 22:33:50 GMT | ||
* Dependencies: none | ||
@@ -14,0 +14,0 @@ * Global values: `OO` |
@@ -96,3 +96,3 @@ declare namespace OO { | ||
interface RegistryConstructor { | ||
new (): Registry; | ||
new(): Registry; | ||
prototype: Registry; | ||
@@ -99,0 +99,0 @@ static: {}; |
@@ -57,3 +57,3 @@ declare namespace OO { | ||
/** @param sortingCallback Callback that compares two items. */ | ||
new (sortingCallback: SortingCallback): SortedEmitterList; | ||
new(sortingCallback: SortingCallback): SortedEmitterList; | ||
prototype: SortedEmitterList; | ||
@@ -60,0 +60,0 @@ super: EmitterListConstructor; |
declare namespace OO { | ||
type Constructor = new (...args: any) => any; | ||
type Constructor = new(...args: any) => any; | ||
type ConstructorLike = (new (...args: any) => any) | ((...args: any) => any); | ||
type ConstructorLike = (new(...args: any) => any) | ((...args: any) => any); | ||
@@ -41,6 +41,5 @@ type ValidKey = string | number; | ||
...ConstrainedInference<ValidKey[], infer RestKeys>, | ||
] | ||
? RecursivelyGet<GetProp<T, FirstKey>, RestKeys> | ||
] ? RecursivelyGet<GetProp<T, FirstKey>, RestKeys> | ||
: never; | ||
}[K extends [ValidKey] ? 'done' : 'recur']; | ||
}[K extends [ValidKey] ? "done" : "recur"]; | ||
@@ -53,6 +52,6 @@ type NodesOf<T, D extends number> = { | ||
| NodesOf< | ||
Exclude<ValueOf<T>, NonPlainObject>, | ||
[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][D] | ||
>; | ||
}[D extends -1 ? 'done' : T extends NonPlainObject ? 'done' : 'recur']; | ||
Exclude<ValueOf<T>, NonPlainObject>, | ||
[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][D] | ||
>; | ||
}[D extends -1 ? "done" : T extends NonPlainObject ? "done" : "recur"]; | ||
@@ -62,5 +61,4 @@ type LeavesOf<T, D extends number> = T extends NonPlainObject ? T : Extract<NodesOf<T, D>, NonPlainObject>; | ||
type FunctionFieldsOf<T, F extends (...args: any[]) => any, K extends keyof T = keyof T> = K extends any | ||
? T[K] extends F | ||
? K | ||
: never | ||
? T[K] extends F ? K | ||
: never | ||
: never; | ||
@@ -67,0 +65,0 @@ |
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
34805