type SchemaLeaf = "copy" | "convert";
export interface SchemaProperty {
  required: boolean;
  schema: Schema;
  derive?(v: any): any;
}
interface SchemaObject {
  [property: string]: SchemaProperty;
}
type SchemaArray = [SchemaObject] | [SchemaLeaf];

export type Schema = SchemaLeaf | SchemaArray | SchemaObject;

type SchemaLeaf = "copy" | "convert";
export interface SchemaProperty {
  required: boolean;
  schema: Schema;
  derive?: (v: any) => any;
}
interface SchemaObject {
  [property: string]: SchemaProperty;
}
type SchemaArray = [SchemaObject] | [SchemaLeaf];

export type Schema = SchemaLeaf | SchemaArray | SchemaObject;

Use standalone function type for `derive` in the schema format declaration.
Use standalone function type for `derive` in the schema format declaration.
