Implement schema interface as decided in #311
Please include type "macros" for grabbing annotation names and annotation classes.
Given a schema:
import { Bold, Italic } from "@atjson/offset-annotations";
const MySchema = {
annotations: {
Bold,
Italic
}
};
The annotations name type should return a type of "Bold" | "Italic" and the annotations class type should return typeof Bold | typeof Italic.
You can reference the document-in-test branch on this repository for some examples of how to do this. Ask @tim-evans if you have questions on handling this via conditional types.
Implement schema interface as decided in #311
Please include type "macros" for grabbing annotation names and annotation classes.
Given a schema:
The annotations name type should return a type of
"Bold" | "Italic"and the annotations class type should returntypeof Bold | typeof Italic.You can reference the document-in-test branch on this repository for some examples of how to do this. Ask @tim-evans if you have questions on handling this via conditional types.