@tilua-types/luau 9.0.2 → 9.1.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
@@ -58,10 +58,10 @@ It is this library's option, on unless the config turns it off:
58
58
  <!-- compatibility:start -->
59
59
  ## Compatibility
60
60
 
61
- `@tilua-types/luau@9.0.2` works with these tilua packages. *Released with* is the
61
+ `@tilua-types/luau@9.1.0` works with these tilua packages. *Released with* is the
62
62
  version it was built and tested against.
63
63
 
64
64
  | Package | Range | Released with | |
65
65
  | --- | --- | --- | --- |
66
- | `@tilua/parser` | `^9.0.0` | 9.0.2 | peer |
66
+ | `@tilua/parser` | `^9.0.0` | 9.1.0 | peer |
67
67
  <!-- compatibility:end -->
package/exports.mjs CHANGED
@@ -169,10 +169,12 @@ class TypeWriter {
169
169
  return `${generic.name}<${ref.typeArguments.map(a => next(a)).join(", ")}>`
170
170
  }
171
171
  // A class the host made — a Roblox `Part` — is a type
172
- // its Luau already has, by the same name.
172
+ // its Luau already has, by the same name. An instance of
173
+ // a sourcemap's tree is only a type here: its Luau has
174
+ // the class it is an instance of.
173
175
  if (type.class && !type.class.runtime && isLuauName(type.class.name)) {
174
176
  const args = type.class.typeArguments?.get(type.class.name)
175
- return args?.length ? `${type.class.name}<${args.map(a => next(a)).join(", ")}>` : type.class.name
177
+ return args?.length ? `${type.class.name}<${args.map(a => next(a)).join(", ")}>` : type.class.shown ?? type.class.name
176
178
  }
177
179
  if (type.name && !ref) return this.named(type.name, type, scope)
178
180
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tilua-types/luau",
3
- "version": "9.0.2",
3
+ "version": "9.1.0",
4
4
  "description": "Luau as a tilua type library: what Luau adds to Lua 5.1 (buffer, bit32, string.split, ...), and Luau's syntax in the compiled output",
5
5
  "license": "ISC",
6
6
  "files": [