Skip to content

Instantly share code, notes, and snippets.

@krukru
Last active March 26, 2020 08:10
Show Gist options
  • Save krukru/6aab42a658bbaf587e4237f8ea186b66 to your computer and use it in GitHub Desktop.
Save krukru/6aab42a658bbaf587e4237f8ea186b66 to your computer and use it in GitHub Desktop.
export class ParentAvro extends BaseAvroRecord {
public static readonly schema: object = {}; // here is some schema object
@MyAvroDecorator(() => ChildAvro) // <-- Note the decorator
public child: ChildAvro;
public get schema(): object {
return ParentAvro.schema;
}
}
export class ChildAvro extends BaseAvroRecord {
public static readonly schema: object = {}; // here is some schema object
public someProperty: string;
public get schema(): object {
return ChildAvro.schema;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment