-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Autocomplete: refactor to TypeScript (#47751)
* Remove from exclude list * Rename and add files * Add `WPCompleter` typing * Add `AutocompleterUI` typing * Add `getDeafaultUseItems` typing * Add `useAutocomplete` typing * Add `useAutocompleteProps` method typing * Add `Autocomplete` typing * Supress declaration module warnings from `@wordpress/rich-text` * Update and type unit test * update CHANGELOG * update README * Clean up `AutocompleterUI`s `popoverRef` typing * Simplify check for matches in `AutocompleterUI` * README whitespace cleanup * Improved optional `onKeyDownRef.current()` call * Simplify/inline `getOptionCompletion` type declaration * inferred return type for `getDefualtUseItems` * Rename `DebouncedPromise` to `CancelablePromise` * replace a negated OR with AND comparison * restore origional action/value destructuring * Clean up ContentRef typing to use immutable ref object * improve typing in unit test * Conditionally type `WPCompleter.options` * `switch to `React.Type` instead of importing from `react` * remove outdated code comment * remove unnecessary JSDoc * fix rich text `@see` tag * fix typos * Max 80 char per line * Revert "Conditionally type `WPCompleter.options`" This reverts commit 4bb27ee. * Simplify `options` typing * typo * update option completion types * Type `Component` prop as `React.ElementType` * Add more specific type/variable name to filteredOptions default value * Add missing CHANGELOG entry * Add back undefined checks for action/value completionObject --------- Co-authored-by: Marco Ciampini <marco.ciampo@gmail.com>
- Loading branch information
Showing
8 changed files
with
417 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.