diff --git a/janitor/CHANGELOG.md b/janitor/CHANGELOG.md index a2c7c4c..692f3d5 100644 --- a/janitor/CHANGELOG.md +++ b/janitor/CHANGELOG.md @@ -2,6 +2,9 @@ ### Unreleased Changes +### 1.17.0-ts.1 +- Fix `.AddObject` type definition + ### 1.17.0-ts.0 - Updated to upstream [`1.17.0`](https://github.com/howmanysmall/Janitor/releases/tag/v1.17.0) Janitor source diff --git a/janitor/index.d.ts b/janitor/index.d.ts index 3eacc3c..e47cfc1 100644 --- a/janitor/index.d.ts +++ b/janitor/index.d.ts @@ -1,4 +1,4 @@ -type Constructable> = new (...args: Args) => T; +type Constructable = new (...args: Parameters) => T; /** * A class to manage the connections in your game @@ -67,11 +67,11 @@ export class Janitor { * @returns The new constructed object from the passed `object` class. */ public AddObject< - O extends Constructable>, - M extends undefined | ((this: O) => void) | ((_: O) => void) | ExtractKeys void> | true, - I extends keyof U | undefined = undefined, - Args extends Array = [], - >(object: Constructable, methodName?: M, index?: I, ...args: Args): O; + O extends Constructable, + T extends InstanceType, + M extends undefined | ExtractKeys void> | true, + I extends keyof U | undefined = undefined, + >(object: O, methodName?: M, index?: I, ...args: ConstructorParameters): T; /** * Cleans up whatever `object` was set to this namespace by the 3rd parameter of `.Add()`. diff --git a/janitor/package-lock.json b/janitor/package-lock.json index f97480c..bf88afc 100644 --- a/janitor/package-lock.json +++ b/janitor/package-lock.json @@ -1,12 +1,12 @@ { "name": "@rbxts/janitor", - "version": "1.17.0-ts.0", + "version": "1.17.0-ts.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@rbxts/janitor", - "version": "1.17.0-ts.0", + "version": "1.17.0-ts.1", "license": "Apache-2.0", "devDependencies": { "@rbxts/compiler-types": "^2.2.0-types.0", @@ -17,13 +17,15 @@ "version": "2.2.0-types.0", "resolved": "https://registry.npmjs.org/@rbxts/compiler-types/-/compiler-types-2.2.0-types.0.tgz", "integrity": "sha512-ycsIGfp49MypbRi4eEPCXTjbb2iLKL1/2GjRrFLuLJL74fCfVtbAXIo2LiZhPrgqIiBLomb4JN5Rcqv4304bzw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@rbxts/types": { - "version": "1.0.801", - "resolved": "https://registry.npmjs.org/@rbxts/types/-/types-1.0.801.tgz", - "integrity": "sha512-8F9mR7cwVtkbdr0oj0Pq26ncstqs8t/a2jYrbXAe2YkmCBJwr3Iddo2lDVKelISAWJtD5wz1YSxH0uUO//XsqQ==", - "dev": true + "version": "1.0.802", + "resolved": "https://registry.npmjs.org/@rbxts/types/-/types-1.0.802.tgz", + "integrity": "sha512-w8hoN4qpRzfaJG/YzcAE26M2fIce3TxPNmfLwczKa9aUsZBq8QPhMUr2LO4lT39lN7rt9EffzSrCkc4uqrFCdg==", + "dev": true, + "license": "MIT" } } } diff --git a/janitor/package.json b/janitor/package.json index 0b3ced9..418b2f5 100644 --- a/janitor/package.json +++ b/janitor/package.json @@ -1,6 +1,6 @@ { "name": "@rbxts/janitor", - "version": "1.17.0-ts.0", + "version": "1.17.0-ts.1", "description": "A port of howmanysmall's janitor module.", "main": "src/init.lua", "types": "index.d.ts", @@ -8,9 +8,6 @@ "index.d.ts", "src/" ], - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, "repository": { "type": "git", "url": "https://github.com/OverHash/Roblox-TS-Libraries/tree/master/janitor"