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:
@@ -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",
|
||||
|
@@ -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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user