Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 24 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"types/*.d.ts"
],
"devDependencies": {
"@rbxts/types": "^1.0.805",
"@rbxts/types": "^1.0.894",
"@typescript-eslint/eslint-plugin": "^8.5.0",
"@typescript-eslint/parser": "^8.5.0",
"eslint": "^8.57.0",
Expand Down
14 changes: 7 additions & 7 deletions types/typeUtils.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,28 +91,28 @@ type WritablePropertyNames<T> = {
type WritableProperties<T> = Pick<T, WritablePropertyNames<T>>;

/** Given an Instance `T`, returns a unioned type of all property names. */
type InstancePropertyNames<T extends Instance> = Exclude<
type InstancePropertyNames<T extends RBXObject> = Exclude<
ExcludeKeys<T, RBXScriptSignal | Callback | symbol>,
"Changed"
>;

/** Given an Instance `T`, returns a unioned type of all method names. */
type InstanceMethodNames<T extends Instance> = ExtractKeys<T, Callback>;
type InstanceMethodNames<T extends RBXObject> = ExtractKeys<T, Callback>;

/** Given an Instance `T`, returns a unioned type of all event names. */
type InstanceEventNames<T extends Instance> = ExtractKeys<T, RBXScriptSignal>;
type InstanceEventNames<T extends RBXObject> = ExtractKeys<T, RBXScriptSignal>;

/** Given an Instance `T`, returns an object with only properties. */
type InstanceProperties<T extends Instance> = Pick<T, InstancePropertyNames<T>>;
type InstanceProperties<T extends RBXObject> = Pick<T, InstancePropertyNames<T>>;

/** Given an Instance `T`, returns an object with only methods. */
type InstanceMethods<T extends Instance> = Pick<T, InstanceMethodNames<T>>;
type InstanceMethods<T extends RBXObject> = Pick<T, InstanceMethodNames<T>>;

/** Given an Instance `T`, returns an object with only events. */
type InstanceEvents<T extends Instance> = Pick<T, InstanceEventNames<T>>;
type InstanceEvents<T extends RBXObject> = Pick<T, InstanceEventNames<T>>;

/** Given an Instance `T`, returns an object with readonly fields, methods, and events filtered out. */
type WritableInstanceProperties<T extends Instance> = WritableProperties<InstanceProperties<T>>;
type WritableInstanceProperties<T extends RBXObject> = WritableProperties<InstanceProperties<T>>;

/** Returns a union of all the keys of T which do not start with `_nominal_` */
type ExcludeNominalKeys<T> = {
Expand Down
Loading