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

It seems that intellij is not properly referencing the type. #946

Closed
PrestigeLulu opened this issue May 12, 2023 · 2 comments
Closed

It seems that intellij is not properly referencing the type. #946

PrestigeLulu opened this issue May 12, 2023 · 2 comments

Comments

@PrestigeLulu
Copy link

`import {Players} from "@rbxts/services";

const player:Player = Players.LocalPlayer

print(player.Name)`

In this code, autocomplete is not properly supported after the player.
because the red line
It says unresolvable variable
But the code works fine.

My guess is that the references in the PluginSecurity.d.ts and None.d.ts files don't seem right.

@LouieK22
Copy link
Contributor

On the latest version of Webstorm (2023.1.2), the reference is resolving correctly and Player.Name is interpreted as a string. However, all references to Instances are broken (e.g. t.instanceOf()) since Instance gained the AddTag method which is invalid when inherited by CollectionService, producing this error:

TS2430: Interface 'CollectionService' incorrectly extends interface 'Instance'.
Types of property 'AddTag' are incompatible.
Type '(this: CollectionService, instance: Instance, tag: string) => void' is not assignable to type '(this: Instance, tag: string) => void'.

@Dionysusnu
Copy link
Contributor

[] all references to Instances are broken (e.g. t.instanceOf()) since Instance gained the AddTag method which is invalid when inherited by CollectionService, producing this error:

TS2430: Interface 'CollectionService' incorrectly extends interface 'Instance'.
Types of property 'AddTag' are incompatible.
Type '(this: CollectionService, instance: Instance, tag: string) => void' is not assignable to type '(this: Instance, tag: string) => void'.

For reference: This was fixed in #964

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

No branches or pull requests

3 participants