Skip to content

Commit 1dcb86e

Browse files
committed
docs: correct new MyStruct syntax in README example
Correct the TypeScript syntax for creating a new MyStruct instance in the README example from `new(MyStruct)` to `new MyStruct()`. Signed-off-by: Christian Stewart <christian@aperture.us>
1 parent a40b093 commit 1dcb86e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ export async function main(): Promise<void> {
353353
console.log("instance.MyInt:", instance.MyInt, "copyInst.MyInt:", copyInst.MyInt)
354354

355355
// Pointer initialization and dereference assignment
356-
let ptr = new(MyStruct)
356+
let ptr = new MyStruct()
357357
ptr.MyInt = 9
358358
console.log("ptr.MyInt:", ptr.MyInt)
359359
let deref = ptr.clone()

0 commit comments

Comments
 (0)