omelop-json-schema
Version:
解析 ts 的interface 到 omelox-protobuf用的 json格式。
36 lines (31 loc) • 537 B
text/typescript
import { GGG, MyRank } from "./share/myrank";
interface IGG {
ggenv?: string[];
}
interface IFF {
ffname: string;
aa?: IGG[];
}
enum EnumTest {
AA,
BB,
CC
}
export interface onRank extends IFF, IGG {
/**
* The float of the nowplayers.
*
* @additionalProperties number
* @TJS-type array
*/
normalArr: number[];
/**
* @TJS-type number
*/
enum: EnumTest;
normalStrArr: string[];
innerGGG?: GGG;
ranks: MyRank[];
rk?: MyRank;
val?: number;
}