@defold-typescript/library-types 0.20.7 → 0.21.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/api-doc/decore.json +1883 -0
- package/api-doc/druid.json +11818 -0
- package/generated/decore.d.ts +228 -0
- package/generated/druid.d.ts +2067 -0
- package/luals-targets.json +28 -0
- package/package.json +8 -3
- package/scripts/__snapshots__/emit-library-dts.test.ts.snap +22 -0
- package/scripts/__snapshots__/parse-luals.test.ts.snap +15780 -0
- package/scripts/emit-library-dts.ts +252 -0
- package/scripts/lower-api-doc.ts +115 -0
- package/scripts/luals-fidelity.ts +123 -0
- package/scripts/map-luals-types.ts +323 -0
- package/scripts/parse-luals.ts +432 -0
- package/scripts/sync-luals-types.ts +303 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"targets": [
|
|
3
|
+
{
|
|
4
|
+
"repo": "https://github.com/Insality/druid",
|
|
5
|
+
"ref": "1.2.5",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"sourceGlobs": ["druid/**/*.lua"],
|
|
8
|
+
"moduleId": "druid.druid",
|
|
9
|
+
"namespace": "druid",
|
|
10
|
+
"typeRenames": {
|
|
11
|
+
"vector": "Vector",
|
|
12
|
+
"vector3": "Vector3",
|
|
13
|
+
"vector4": "Vector4"
|
|
14
|
+
},
|
|
15
|
+
"ignore": ["**/test/**", "**/example/**", "**/example_*/**"]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"repo": "https://github.com/Insality/decore",
|
|
19
|
+
"ref": "4",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"sourceGlobs": ["decore/**/*.lua"],
|
|
22
|
+
"moduleId": "decore.decore",
|
|
23
|
+
"namespace": "decore",
|
|
24
|
+
"typeRenames": {},
|
|
25
|
+
"ignore": ["**/test/**", "**/example/**"]
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defold-typescript/library-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"description": "Vendored TypeScript types for popular Defold Lua libraries, core-type-renamed against @defold-typescript/types.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -161,6 +161,7 @@
|
|
|
161
161
|
"scripts",
|
|
162
162
|
"library-targets.json",
|
|
163
163
|
"library-classification.json",
|
|
164
|
+
"luals-targets.json",
|
|
164
165
|
"NOTICE",
|
|
165
166
|
"!scripts/**/*.test.ts"
|
|
166
167
|
],
|
|
@@ -168,10 +169,14 @@
|
|
|
168
169
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
169
170
|
"regen": "bun scripts/sync-library-types.ts",
|
|
170
171
|
"check": "bun scripts/sync-library-types.ts --check",
|
|
171
|
-
"classify": "bun scripts/sync-library-types.ts --classify"
|
|
172
|
+
"classify": "bun scripts/sync-library-types.ts --classify",
|
|
173
|
+
"luals:fetch": "bun scripts/sync-luals-types.ts --fetch",
|
|
174
|
+
"luals:fidelity": "bun scripts/sync-luals-types.ts --fidelity",
|
|
175
|
+
"luals:emit": "bun scripts/sync-luals-types.ts --emit",
|
|
176
|
+
"luals:api-doc": "bun scripts/sync-luals-types.ts --api-doc"
|
|
172
177
|
},
|
|
173
178
|
"dependencies": {
|
|
174
|
-
"@defold-typescript/types": "0.
|
|
179
|
+
"@defold-typescript/types": "0.21.0"
|
|
175
180
|
},
|
|
176
181
|
"devDependencies": {
|
|
177
182
|
"@typescript-to-lua/language-extensions": "1.19.0",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Bun Snapshot v1, https://bun.sh/docs/test/snapshots
|
|
2
|
+
|
|
3
|
+
exports[`emits a declare module block with an interface, its field and method, and a module function 1`] = `
|
|
4
|
+
"/** @noResolution */
|
|
5
|
+
declare module 'demo.demo' {
|
|
6
|
+
/**
|
|
7
|
+
* A widget.
|
|
8
|
+
*/
|
|
9
|
+
interface widget {
|
|
10
|
+
count: number;
|
|
11
|
+
/**
|
|
12
|
+
* Resize the widget.
|
|
13
|
+
*/
|
|
14
|
+
resize(size: number): boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Create a widget.
|
|
18
|
+
*/
|
|
19
|
+
export function create(this: void): widget;
|
|
20
|
+
}
|
|
21
|
+
"
|
|
22
|
+
`;
|