From 5deb7e5b35c792421931b70be4036726c7d27653 Mon Sep 17 00:00:00 2001 From: Ukendio Date: Sat, 7 Sep 2024 22:42:35 +0200 Subject: [PATCH] Update typescript types --- package.json | 92 +++++++++++++++++++++++++------------------------- src/index.d.ts | 9 +++-- 2 files changed, 52 insertions(+), 49 deletions(-) diff --git a/package.json b/package.json index 23d2749..c14e513 100644 --- a/package.json +++ b/package.json @@ -1,46 +1,46 @@ -{ - "name": "@rbxts/jecs", - "version": "0.2.9", - "description": "Stupidly fast Entity Component System", - "main": "src/init", - "repository": { - "type": "git", - "url": "https://github.com/ukendio/jecs.git" - }, - "keywords": [], - "author": "Ukendio", - "contributors": [ - "Ukendio", - "EncodedVenom" - ], - "homepage": "https://github.com/ukendio/jecs", - "license": "MIT", - "types": "src/index.d.ts", - "files": [ - "src", - "LICENSE.md", - "README.md" - ], - "publishConfig": { - "access": "public" - }, - "devDependencies": { - "@rbxts/compiler-types": "^2.3.0-types.1", - "@rbxts/types": "^1.0.781", - "@typescript-eslint/eslint-plugin": "^5.8.0", - "@typescript-eslint/parser": "^5.8.0", - "eslint": "^8.5.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-prettier": "^4.0.0", - "eslint-plugin-roblox-ts": "^0.0.32", - "prettier": "^2.5.1", - "roblox-ts": "^2.3.0", - "typescript": "^5.4.2", - "vitepress": "^1.3.0" - }, - "scripts": { - "docs:dev": "vitepress dev docs", - "docs:build": "vitepress build docs", - "docs:preview": "vitepress preview docs" - } -} +{ + "name": "@rbxts/jecs", + "version": "0.2.10", + "description": "Stupidly fast Entity Component System", + "main": "src/init", + "repository": { + "type": "git", + "url": "https://github.com/ukendio/jecs.git" + }, + "keywords": [], + "author": "Ukendio", + "contributors": [ + "Ukendio", + "EncodedVenom" + ], + "homepage": "https://github.com/ukendio/jecs", + "license": "MIT", + "types": "src/index.d.ts", + "files": [ + "src", + "LICENSE.md", + "README.md" + ], + "publishConfig": { + "access": "public" + }, + "devDependencies": { + "@rbxts/compiler-types": "^2.3.0-types.1", + "@rbxts/types": "^1.0.781", + "@typescript-eslint/eslint-plugin": "^5.8.0", + "@typescript-eslint/parser": "^5.8.0", + "eslint": "^8.5.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-prettier": "^4.0.0", + "eslint-plugin-roblox-ts": "^0.0.32", + "prettier": "^2.5.1", + "roblox-ts": "^2.3.0", + "typescript": "^5.4.2", + "vitepress": "^1.3.0" + }, + "scripts": { + "docs:dev": "vitepress dev docs", + "docs:build": "vitepress build docs", + "docs:preview": "vitepress preview docs" + } +} diff --git a/src/index.d.ts b/src/index.d.ts index d78e732..67e95f6 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -159,10 +159,13 @@ export const IS_PAIR: (e: Entity) => boolean; */ export const Component: Entity; -export const OnAdd: Entity; -export const OnRemove: Entity; -export const OnSet: Entity; +export const OnAdd: Entity<(e: Entity) => void>; +export const OnRemove: Entity<(e: Entity) => void>; +export const OnSet: Entity<(e: Entity, value: unknown) => void>; export const OnDeleteTarget: Entity; +export const OnDelete: Entity; export const Delete: Entity; +export const Remove: Entity; +export const Tag: Entity; export const Wildcard: Entity; export const Rest: Entity;