1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-28 17:39:57 +02:00

Improved Types (#4119)

* Experimental release to see if CustomTypes holds up through a publish

* Add experimental release script

* Fix lint

* v0.60.5-alpha.0

* Allow null properties in setNodes

* v0.60.6-alpha.0

* Revert null properties on Transforms.setNodes

* v0.60.7-alpha.0

* Update examples to use custom Element and Text with discriminated unions

* Add documentation for using TypeScript improvements

* Be explicit about typescript version in package.json

* Force lerna bootstrap to fix build issues on CI and fix a few type examples

* Add slate devDependencies with * back

* v0.60.7

* Switch to a non prerelease version to fix lerna not linking in root

* Add documentation for not using prerelease versions and on how to create experimental releases

* Try removing lerna bootstrap and see if it works
This commit is contained in:
Sunny Hirai
2021-03-11 11:48:31 -08:00
committed by GitHub
parent 5267f07175
commit a72958e6c3
37 changed files with 4006 additions and 116 deletions

View File

@@ -1,7 +1,7 @@
{
"name": "slate-react",
"description": "Tools for building completely customizable richtext editors with React.",
"version": "0.60.4",
"version": "0.60.7",
"license": "MIT",
"repository": "git://github.com/ianstormtaylor/slate.git",
"main": "dist/index.js",
@@ -23,9 +23,9 @@
"scroll-into-view-if-needed": "^2.2.20"
},
"devDependencies": {
"slate": "^0.60.4",
"slate-history": "^0.60.4",
"slate-hyperscript": "^0.60.4"
"slate": "^0.60.7",
"slate-history": "^0.60.7",
"slate-hyperscript": "^0.60.7"
},
"peerDependencies": {
"react": ">=16.8.0",

View File

@@ -1,12 +1,12 @@
import { CustomTypes } from 'slate'
import { BaseRange, BaseText } from 'slate'
declare module 'slate' {
interface CustomTypes {
Text: {
placeholder: string
}
} & BaseText
Range: {
placeholder?: string
}
} & BaseRange
}
}