@defold-typescript/tstl-plugin 0.8.4 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -15,7 +15,7 @@ Most users get this wired in automatically by the
15
15
  `plugins` array.
16
16
 
17
17
  See the repository [README](https://github.com/defold-typescript/toolchain#readme)
18
- and [`docs/guide/`](https://github.com/defold-typescript/toolchain/tree/main/docs/guide)
18
+ and [`packages/docs/guide/`](https://github.com/defold-typescript/toolchain/tree/main/packages/docs/guide)
19
19
  for the full workflow.
20
20
 
21
21
  ## License
package/dist/index.js CHANGED
@@ -4,11 +4,13 @@ function init(modules) {
4
4
  const ts = modules.typescript;
5
5
  function create(info) {
6
6
  const proxy = Object.create(null);
7
+ const writable = proxy;
7
8
  const base = info.languageService;
8
9
  for (const key of Object.keys(base)) {
9
10
  const member = base[key];
10
11
  if (typeof member === "function") {
11
- proxy[key] = (...args) => member.apply(base, args);
12
+ const fn = member;
13
+ writable[key] = (...args) => fn.apply(base, args);
12
14
  }
13
15
  }
14
16
  proxy.getSemanticDiagnostics = (fileName) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defold-typescript/tstl-plugin",
3
- "version": "0.8.4",
3
+ "version": "0.9.0",
4
4
  "description": "TypeScript language-service plugin surfacing Defold transpiler diagnostics live in the editor.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -35,7 +35,7 @@
35
35
  "test": "bun test"
36
36
  },
37
37
  "dependencies": {
38
- "@defold-typescript/transpiler": "0.8.4"
38
+ "@defold-typescript/transpiler": "0.9.0"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "typescript": ">=5.0.0"
package/src/index.ts CHANGED
@@ -11,12 +11,13 @@ export default function init(modules: { typescript: typeof import("typescript")
11
11
 
12
12
  function create(info: ts.server.PluginCreateInfo): ts.LanguageService {
13
13
  const proxy = Object.create(null) as ts.LanguageService;
14
+ const writable = proxy as unknown as Record<string, unknown>;
14
15
  const base = info.languageService;
15
16
  for (const key of Object.keys(base) as Array<keyof ts.LanguageService>) {
16
17
  const member = base[key];
17
18
  if (typeof member === "function") {
18
- // biome-ignore lint/suspicious/noExplicitAny: opaque LS member forwarding.
19
- (proxy as any)[key] = (...args: unknown[]) => (member as any).apply(base, args);
19
+ const fn = member as (...args: unknown[]) => unknown;
20
+ writable[key] = (...args: unknown[]) => fn.apply(base, args);
20
21
  }
21
22
  }
22
23