(
input: ts.ClassDeclaration,
serializable: TypeSchema,
importer: (name: string, module: string) => void
)
| 33 | } |
| 34 | |
| 35 | export function createFromJsonMethod( |
| 36 | input: ts.ClassDeclaration, |
| 37 | serializable: TypeSchema, |
| 38 | importer: (name: string, module: string) => void |
| 39 | ) { |
| 40 | const methodDecl = createNodeFromSource<ts.MethodDeclaration>( |
| 41 | `public class Serializer { |
| 42 | public static fromJson(obj: ${input.name!.text}, m: unknown): void { |
| 43 | } |
| 44 | }`, |
| 45 | ts.SyntaxKind.MethodDeclaration |
| 46 | ); |
| 47 | return setMethodBody(methodDecl, generateFromJsonBody(input, serializable, importer)); |
| 48 | } |
no test coverage detected