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

Mark .server.ts files as being NetworkType server #200

Open
Dionysusnu opened this issue Nov 22, 2022 · 0 comments
Open

Mark .server.ts files as being NetworkType server #200

Dionysusnu opened this issue Nov 22, 2022 · 0 comments

Comments

@Dionysusnu
Copy link
Contributor

Dionysusnu commented Nov 22, 2022

If a .server.ts file ends up executing, it will always be as a server script*. This means it will have access to things like ServerStorage, regardless of where the script is located. Therefore, RojoResolver should mark it as having NetworkType server. However, currently, it is always marked according to its location.
For example, a server script under StarterPlayerScripts gets NetworkType client. This generates a false-positive diagnostic when that file imports a ServerStorage file.

*I need to check what rojo uses for precedence between file extension and meta files. Can init.server.ts end up as a LocalScript if the meta.json dictates it?

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

1 participant