mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-19 21:51:51 +02:00
Merge TypeScript types from master into main
This commit is contained in:
@@ -237,7 +237,7 @@ export function createEditor(
|
||||
const selection: Partial<Range> = {}
|
||||
const editor = makeEditor()
|
||||
Object.assign(editor, attributes)
|
||||
editor.children = descendants
|
||||
editor.children = descendants as Element[]
|
||||
|
||||
// Search the document's texts to see if any of them have tokens associated
|
||||
// that need incorporated into the selection.
|
||||
|
6
packages/slate-hyperscript/test/jsx.d.ts
vendored
Normal file
6
packages/slate-hyperscript/test/jsx.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
// This allows tests to include Slate Nodes written in JSX without TypeScript complaining.
|
||||
declare namespace jsx.JSX {
|
||||
interface IntrinsicElements {
|
||||
[elemName: string]: any // eslint-disable-line
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user