DefinitelyTyped/types/slate-html-serializer/slate-html-serializer-tests.ts
jasonphillips 029532c8e9
[slate-html-serializer]: defaultBlock argument accepts string (#44938)
* add breaking defaultBlock test

* permit string for defaultBlock argument
2020-05-26 18:27:16 -07:00

16 lines
296 B
TypeScript

import Html, { Rule } from "slate-html-serializer";
const myRule: Rule = {
deserialize: (el, next) => {},
serialize: () => null
};
const serializer = new Html({
rules: [myRule]
});
const serializerWithDefaultBlock = new Html({
rules: [myRule],
defaultBlock: 'unstyled'
});