editor.js/types/configs
Ilya Maroz 75379c66a9
deps(TypeScript) - upgrade to v5, upgrade ts-loader, fix types error, fix pasteConfig getter wrapper (#2322)
* deps: upgrade typescript to v5, upgrade ts-loader to support newest TS

* Fix (??) type of `pasteConfig`

TypeScript 4.9 found something is wrong with this code, but it's unclear (to me) which line is wrong. This PR is a guess, do with it what you will.

In paste.ts there's a check to see if `pasteConfig === false`:
https://github.com/codex-team/editor.js/blob/next/src/components/modules/paste.ts#L287

However, this getter never returns false because if the LHS of the `||` is `false`, `{ }` is returned instead.

It seems like this meant to be `??` instead so that if `this.constructable[InternalBlockToolSettings.PasteConfig]` was `undefined` (missing), then `{}` would be returned instead. But maybe you meant `false` here - I don't know.

* feat: create alias for PasteConfig, fix lint

* fix: problems with types

* test: add case for disabling preventing default behavior of paste event handler, add cases for pasteConfig getter in BlockTool wrapper

* chore: upgrade CHANGELOG.md

* fix: interface naming convention

* chore: apply CHANGELOG.md suggestion

* refactor: create custom Editor instance inside test case

* fix: remove editor instance destroy after PR feedback

---------

Co-authored-by: Ryan Cavanaugh <RyanCavanaugh@users.noreply.github.com>
2023-04-02 16:52:42 +01:00
..
conversion-config.ts fix(types): compiler error from importing type BlockToolData (#2264) 2023-02-21 00:18:50 +02:00
editor-config.d.ts feat(onchange): callback now accepts custom event (#1791) 2021-10-05 20:40:44 +03:00
i18n-config.d.ts Release: 2.19 (#1364) 2020-10-13 20:50:46 +03:00
i18n-dictionary.d.ts Release / 2.18 (#1181) 2020-06-03 11:17:29 +03:00
index.d.ts Remove incorrect import for typings (#2252) 2023-01-31 20:32:43 +03:00
log-levels.d.ts Release 2.16 (#966) 2019-11-30 23:42:39 +03:00
paste-config.d.ts deps(TypeScript) - upgrade to v5, upgrade ts-loader, fix types error, fix pasteConfig getter wrapper (#2322) 2023-04-02 16:52:42 +01:00
popover.d.ts fix(tunes): Make label an alias for title in tunes menu item (#2198) 2022-12-14 23:46:36 +03:00
sanitizer-config.d.ts fix(tools-api): pasteConfig.tags now supports a sanitize config (#2100) 2022-11-22 00:28:53 +04:00