Skip to content

Commit d255f5d

Browse files
committed
Merge branch 'main' into refactor-mod-ops
2 parents 49f126d + 1983883 commit d255f5d

File tree

9 files changed

+3880
-3798
lines changed

9 files changed

+3880
-3798
lines changed

src/bindings/tsd.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -302,17 +302,16 @@ export class TSDBuilder extends ExportsWalker {
302302
sb.push(mode == Mode.EXPORT ? "<never>" : "<undefined>");
303303
}
304304
} else {
305-
if (this.isPlainObject(clazz)) {
306-
typeName = "__Record" + clazz.id.toString();
307-
sb.push(typeName);
305+
let isPlain = this.isPlainObject(clazz);
306+
typeName = `${isPlain ? "__Record" : "__Internref"}${clazz.id}`;
307+
sb.push(typeName);
308+
seenObjectTypes.set(clazz, typeName);
309+
if (isPlain) {
308310
sb.push(mode == Mode.EXPORT ? "<never>" : "<undefined>");
309311
this.deferredTypings.push(this.makeRecordType(clazz, mode));
310312
} else {
311-
typeName = "__Internref" + clazz.id.toString();
312-
sb.push(typeName);
313313
this.deferredTypings.push(this.makeInternrefType(clazz));
314314
}
315-
seenObjectTypes.set(clazz, typeName);
316315
}
317316
}
318317
if (type.is(TypeFlags.NULLABLE)) {

std/assembly/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1666,7 +1666,7 @@ declare abstract class TypedArray<T> implements ArrayBufferView {
16661666
/** The join() method joins all elements of an array into a string. This method has the same algorithm as Array.prototype.join(). */
16671667
join(separator?: string): string;
16681668
/** The set() method stores multiple values in the typed array, reading input values from a specified array. */
1669-
set<U extends ArrayBufferView>(source: U, offset?: i32): void
1669+
set<U extends ArrayLike<number>>(source: U, offset?: i32): void
16701670
/** The toString() method returns a string representing the specified array and its elements. This method has the same algorithm as Array.prototype.toString() */
16711671
toString(): string;
16721672
}

0 commit comments

Comments
 (0)