1.7.2 • Published 4 months ago

roblox-ts-extensions v1.7.2

Weekly downloads
162
License
MIT
Repository
github
Last release
4 months ago

roblox-ts Extensions

This is a Language Service plugin that improves the editing experience while using roblox-ts.

Features

  • Remove or prefix cross-boundary imports in intellisense.
  • Warn about non-type only cross-boundary imports.
  • Remove internal fields from roblox-ts types.
  • Remove deprecated entries from intellisense.
  • Remove @hidden entries from intellisense.

Visual Studio Code

If you use Visual Studio Code, it's recommended that you install this using our extension.

Installation

You install this like you would any npm package.

npm install --save-dev roblox-ts-extensions

To enable the plugin and configure it, please look to the sections below.

Configuration

interface PluginConfig {
	// The directories to be determined client-sided. Rojo is preferred, however these can override Rojo if necessary.
	// Default: []
	client: string | string[];

	// The directories to be determined server-sided. Rojo is preferred, however these can override Rojo if necessary.
	// Default: []
	server: string | string[];

	// The autocomplete mode to use.
	// Prefix: Prefixes completes with their network boundary, and makes cross-boundary (client<->server, shared->client/server) imports type only.
	// Remove: Removes any cross-boundary imports entirely. Does not affect manual imports or existing imports.
	// Default: prefix
	mode: "prefix" | "remove";

	// Whether to use Rojo to calculate server/client boundaries. The client and server properties can override certain directories if necessary.
	// Default: true
	useRojo: boolean;

	// What should non-type only cross-boundary imports be flagged as.
	// Set to off to disable diagnostics.
	// Default: warning
	diagnosticsMode: "off" | "warning" | "error" | "message";
}

Enabling

To enable the plugin, add the following "plugins" field to your tsconfig's compilerOptions. You can configure the plugin however you'd like, as shown above.

{
	"compilerOptions": {
		// ...
		"plugins": [
			{
				"name": "roblox-ts-extensions",

				// All the following fields are optional and will use their defaults if omitted.

				"client": [],
				"server": [],
				"mode": "prefix",
				"useRojo": true
			}
		]
	}
}
1.7.2

4 months ago

1.7.1

2 years ago

1.7.0

2 years ago

1.6.3

3 years ago

1.6.2

3 years ago

1.6.1

3 years ago

1.6.0

3 years ago

1.5.0

3 years ago

1.4.0

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.9

3 years ago

1.1.10

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago