Skip to content

Commit 6c9b7f3

Browse files
committed
cosmetic fix for typescript gen
1 parent 9ed8b30 commit 6c9b7f3

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/MemoryPack.Generator/MemoryPackGenerator.Parser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ partial class MemberMeta
605605
public bool IsSettable { get; }
606606
public bool IsAssignable { get; }
607607
public bool IsConstructorParameter { get; }
608-
public string ConstructorParameterName { get; }
608+
public string? ConstructorParameterName { get; }
609609
public int Order { get; }
610610
public bool HasExplicitOrder { get; }
611611
public MemberKind Kind { get; }

src/MemoryPack.Generator/MemoryPackGenerator.TypeScript.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ partial class MemoryPackGenerator
7777
// add import(enum, union, memorypackable)
7878
foreach (var item in collector.GetEnums())
7979
{
80-
sb.AppendLine($"import {{ {item.Name} }} from \"./{item.Name}{typeScriptGenerateOptions.ImportExtension}\"; ");
80+
sb.AppendLine($"import {{ {item.Name} }} from \"./{item.Name}{typeScriptGenerateOptions.ImportExtension}\";");
8181
}
8282
foreach (var item in collector.GetMemoryPackableTypes(reference).Where(x => !SymbolEqualityComparer.Default.Equals(x, typeSymbol)))
8383
{
84-
sb.AppendLine($"import {{ {item.Name} }} from \"./{item.Name}{typeScriptGenerateOptions.ImportExtension}\"; ");
84+
sb.AppendLine($"import {{ {item.Name} }} from \"./{item.Name}{typeScriptGenerateOptions.ImportExtension}\";");
8585
}
8686
sb.AppendLine();
8787

src/MemoryPack.Generator/TypeScriptRuntime.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@ public toArray(): Uint8Array {
446446
return this.buffer.slice(0, this.offset);
447447
}
448448
}
449+
449450
""";
450451

451452
public static readonly string MemoryPackReader = """
@@ -838,5 +839,6 @@ public readUint8Array(): Uint8Array | null {
838839
return new Uint8Array(span);
839840
}
840841
}
842+
841843
""";
842844
}

0 commit comments

Comments
 (0)