Update ts codegen (#8421)

Makes the return type of `static getFullyQualifiedName()` be a string literal instead of just the string type

Update tests

Co-authored-by: Björn Harrtell <bjornharrtell@users.noreply.github.com>
This commit is contained in:
Jason
2025-08-17 23:19:08 -04:00
committed by GitHub
parent 5218e29aa4
commit 067bfdbde9
20 changed files with 25 additions and 21 deletions

View File

@@ -33,7 +33,7 @@ mutate_distance(value:number):boolean {
return true;
}
static getFullyQualifiedName():string {
static getFullyQualifiedName(): "MyGame.Example.Ability" {
return 'MyGame.Example.Ability';
}

View File

@@ -813,7 +813,7 @@ mutate_double_inf_default(value:number):boolean {
return true;
}
static getFullyQualifiedName():string {
static getFullyQualifiedName(): "MyGame.Example.Monster" {
return 'MyGame.Example.Monster';
}

View File

@@ -40,7 +40,7 @@ mutate_id(value:bigint):boolean {
return true;
}
static getFullyQualifiedName():string {
static getFullyQualifiedName(): "MyGame.Example.Referrable" {
return 'MyGame.Example.Referrable';
}

View File

@@ -63,7 +63,7 @@ mutate_count(value:number):boolean {
return true;
}
static getFullyQualifiedName():string {
static getFullyQualifiedName(): "MyGame.Example.Stat" {
return 'MyGame.Example.Stat';
}

View File

@@ -20,7 +20,7 @@ a(obj?:StructOfStructs):StructOfStructs|null {
return (obj || new StructOfStructs()).__init(this.bb_pos, this.bb!);
}
static getFullyQualifiedName():string {
static getFullyQualifiedName(): "MyGame.Example.StructOfStructsOfStructs" {
return 'MyGame.Example.StructOfStructsOfStructs';
}

View File

@@ -29,7 +29,7 @@ c(obj?:Ability):Ability|null {
return (obj || new Ability()).__init(this.bb_pos + 12, this.bb!);
}
static getFullyQualifiedName():string {
static getFullyQualifiedName(): "MyGame.Example.StructOfStructs" {
return 'MyGame.Example.StructOfStructs';
}

View File

@@ -41,7 +41,7 @@ mutate_color(value:Color):boolean {
return true;
}
static getFullyQualifiedName():string {
static getFullyQualifiedName(): "MyGame.Example.TestSimpleTableWithEnum" {
return 'MyGame.Example.TestSimpleTableWithEnum';
}

View File

@@ -33,7 +33,7 @@ mutate_b(value:number):boolean {
return true;
}
static getFullyQualifiedName():string {
static getFullyQualifiedName(): "MyGame.Example.Test" {
return 'MyGame.Example.Test';
}

View File

@@ -214,7 +214,7 @@ vf64Array():Float64Array|null {
return offset ? new Float64Array(this.bb!.bytes().buffer, this.bb!.bytes().byteOffset + this.bb!.__vector(this.bb_pos + offset), this.bb!.__vector_len(this.bb_pos + offset)) : null;
}
static getFullyQualifiedName():string {
static getFullyQualifiedName(): "MyGame.Example.TypeAliases" {
return 'MyGame.Example.TypeAliases';
}

View File

@@ -66,7 +66,7 @@ test3(obj?:Test):Test|null {
return (obj || new Test()).__init(this.bb_pos + 26, this.bb!);
}
static getFullyQualifiedName():string {
static getFullyQualifiedName(): "MyGame.Example.Vec3" {
return 'MyGame.Example.Vec3';
}