Skip to content

Commit f06b68f

Browse files
authored
fix: Include the loader's Class.wrap in generated TS definitions (#1618)
1 parent caa5801 commit f06b68f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

NOTICE

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ under the licensing terms detailed in LICENSE:
2929
* Valeria Viana Gusmao <[email protected]>
3030
* Gabor Greif <[email protected]>
3131
* Martin Fredriksson <[email protected]>
32+
* forcepusher <[email protected]>
3233

3334
Portions of this software are derived from third-party works licensed under
3435
the following terms:

src/definitions.ts

+6
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,12 @@ export class TSDBuilder extends ExportsWalker {
496496
sb.push(extendsNode.name.identifier.text); // TODO: fqn?
497497
}
498498
sb.push(" {\n");
499+
if (!isInterface) {
500+
indent(sb, this.indentLevel);
501+
sb.push("static wrap(ptr: usize): ");
502+
sb.push(name);
503+
sb.push(";\n");
504+
}
499505
var staticMembers = element.prototype.members;
500506
if (staticMembers) {
501507
// TODO: for (let member of staticMembers.values()) {

0 commit comments

Comments
 (0)