TypeScript 使用 readonly T[] 表示数组类型
This commit is contained in:
@@ -61,7 +61,7 @@ export class TypeScriptExporter extends TableExporter {
|
|||||||
type = "any";
|
type = "any";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (field.is_array) type = `ReadonlyArray<${type}>`;
|
if (field.is_array) type = `readonly ${type}[]`;
|
||||||
if (field.comment) {
|
if (field.comment) {
|
||||||
if (field.comment.trim().length) {
|
if (field.comment.trim().length) {
|
||||||
let comments = field.comment.split("\n");
|
let comments = field.comment.split("\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user