1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-24 09:13:24 +01:00

64 Commits

Author SHA1 Message Date
Sunny Hirai
0ef080723f Split API reference so each object has its own page 2021-03-29 00:02:43 -07:00
Sunny Hirai
daaeeaf5fe Remove unnecessary * in documentation 2021-03-26 22:30:28 -07:00
Sunny Hirai
2632fd18b4 Add documentation for Path 2021-03-26 22:27:18 -07:00
Sunny Hirai
8b070cc27e Fix heading levels in Locations docs to be consistent 2021-03-26 22:16:00 -07:00
Sunny Hirai
2eeb6833bd Fix heading levels in Node documentation to be consistent 2021-03-26 22:08:08 -07:00
Sunny Hirai
f700aa86c9 Add description for Editor onChange method 2021-03-26 22:06:01 -07:00
Sunny Hirai
287d69ed9e Add documentation for Editor static methods 2021-03-26 22:00:56 -07:00
Sunny Hirai
08275f68f3
Custom TypeScript Types (#3835)
This PR adds better TypeScript types into Slate and is based on the proposal here: https://github.com/ianstormtaylor/slate/issues/3725

* Extend Slate's types like Element and Text

* Supports type discrimination (ie. if an element has type === "table" then we get a reduced set of properties)

* added custom types

* files

* more extensions

* files

* changed fixtures

* changes eslint file

* changed element.children to descendant

* updated types

* more type changes

* changed a lot of typing, still getting building errors

* extended text type in slate-react

* removed type assertions

* Clean up of custom types and a couple uneeded comments.

* Rename headingElement-true.tsx.tsx to headingElement-true.tsx

* moved basetext and baselement

* Update packages/slate/src/interfaces/text.ts

Co-authored-by: Brent Farese <25846953+BrentFarese@users.noreply.github.com>

* Fix some type issues with core functions.

* Clean up text and element files.

* Convert other types to extended types.

* Change the type of editor.marks to the appropriate type.

* Add version 100.0.0 to package.json

* Revert "Add version 100.0.0 to package.json"

This reverts commit 329e44e43d968700655b1c46f968bfd3147e7339.

* added custom types

* files

* more extensions

* files

* changed fixtures

* changes eslint file

* changed element.children to descendant

* updated types

* more type changes

* changed a lot of typing, still getting building errors

* extended text type in slate-react

* removed type assertions

* Clean up of custom types and a couple uneeded comments.

* Rename headingElement-true.tsx.tsx to headingElement-true.tsx

* moved basetext and baselement

* Update packages/slate/src/interfaces/text.ts

Co-authored-by: Brent Farese <25846953+BrentFarese@users.noreply.github.com>

* Fix some type issues with core functions.

* Clean up text and element files.

* Convert other types to extended types.

* Change the type of editor.marks to the appropriate type.

* Run linter.

* Remove key:string uknown from the base types.

* Clean up types after removing key:string unknown.

* Lint and prettier fixes.

* Implement custom-types

Co-authored-by: mdmjg <mdj308@nyu.edu>

* added custom types to examples

* reset yarn lock

* added ts to fixtures

* examples custom types

* Working fix

* ts-thesunny-try

* Extract interface types.

* Fix minor return type in create-editor.

* Fix the typing issue with Location having compile time CustomTypes

* Extract types for Transforms.

* Update README.

* Fix dependency on slate-history in slate-react

Co-authored-by: mdmjg <mdj308@nyu.edu>
Co-authored-by: Brent Farese <brentfarese@gmail.com>
Co-authored-by: Brent Farese <25846953+BrentFarese@users.noreply.github.com>
Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>
2020-11-24 12:30:06 -08:00
Brent Farese
0468290eee
Replace Iterable with Generator. (#3726)
* Replace Iterable with Generator for correct types.
2020-08-06 20:17:50 -04:00
CameronAckermanSEL
d82ffe49a5 Revert "Revert "TypeScript Improvement: Use [key: string]: unknown, not [key: string]: any (#3565)""
This reverts commit 81d2f9bb8f6a78590d7868deb289ec36fb208629.
2020-05-04 17:38:14 -07:00
CameronAckermanSEL
81d2f9bb8f Revert "TypeScript Improvement: Use [key: string]: unknown, not [key: string]: any (#3565)"
This reverts commit d8adf51add861c81b51e969de704d93a51a8990f.
2020-05-04 17:33:39 -07:00
Tim Buckley
d8adf51add
TypeScript Improvement: Use [key: string]: unknown, not [key: string]: any (#3566)
* Change all [key:string]:any -> unknown

Skipping slate-hyperscript, since it seems to be an appropriate use of key: any

* Minor typo fix docs/api/locations

* Check/assert unknown attributes when needed
2020-05-04 17:16:03 -04:00
Kirk Swenson
f6bfe034d7
Fix typos and other minor issues in docs (#3597)
Fixed typos and grammatical errors in the documentation
2020-04-10 09:05:03 -07:00
Cameron Ackerman
1e7d21f7cd
Add API documentation for Slate core package (#3524)
* Create transforms.md

* Create initial documentation for transforms

* Remove extra whitespace in transforms.md

* Create initial documentation for interfaces

* Rearrange API docs by category of interface

* Add documentation of static methods

* Use 'static' notation for transforms
2020-03-05 09:30:29 -08:00