Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetPropertyChangedSignal should only allow strings of properties #53

Closed
Validark opened this issue Mar 31, 2019 · 0 comments · Fixed by #66
Closed

GetPropertyChangedSignal should only allow strings of properties #53

Validark opened this issue Mar 31, 2019 · 0 comments · Fixed by #66

Comments

@Validark
Copy link
Contributor

Validark commented Mar 31, 2019

Here is the proper definition I came up with:

type GetProperties<T> = {
	[Key in keyof T]-?: Key extends "GetPropertyChangedSignal"
		? never
		: T[Key] extends RBXScriptSignal
		? never
		: (() => any) extends T[Key]
		? never
		: Key
}[keyof T];

GetPropertyChangedSignal<T extends GetProperties<this>>(property: T): RBXScriptSignal;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant