ws-docs: examples/cad.luau: typed tables (no new type diagnostic)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
e74aef06ee
commit
b5d3d68dd3
1 file changed
+2
-2
+2
-2
@@ -29,12 +29,12 @@ local step = assert(F.format("step"))
|
||||
print(string.format("schema %s, %d instances, file %s", cad.schema, cad.meta.count, cad.header.FILE_NAME[1]))
|
||||
|
||||
-- count instances per type
|
||||
local counts = {}
|
||||
local counts: { [string]: number } = {}
|
||||
for _, id in step.ids(cad) do
|
||||
local t = cad.entities[id].type
|
||||
counts[t] = (counts[t] or 0) + 1
|
||||
end
|
||||
local types = {}
|
||||
local types: { string } = {}
|
||||
for t in counts do
|
||||
table.insert(types, t)
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user