From 476d7548022ab25cc499f9b3bb712c81a6d3240c Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Thu, 28 Dec 2023 22:04:47 -0500 Subject: Simplify dom text scanner (#453) * Remove "enum" from name, update comment * Simplify --- types/ext/dom-text-scanner.d.ts | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'types') diff --git a/types/ext/dom-text-scanner.d.ts b/types/ext/dom-text-scanner.d.ts index e3ae4b53..33c01aa8 100644 --- a/types/ext/dom-text-scanner.d.ts +++ b/types/ext/dom-text-scanner.d.ts @@ -17,23 +17,10 @@ /** * An enum representing the attributes of the character. - * - * `0` Character should be ignored. - * - * `1` Character is collapsible whitespace. - * - * `2` Character should be added to the content. - * - * `3` Character should be added to the content and is a newline. + * This enum is a number enum for more efficient usage in a highly-traversed code path. + * - `0` - Character should be ignored. + * - `1` - Character is collapsible whitespace. + * - `2` - Character should be added to the content. + * - `3` - Character should be added to the content and is a newline. */ -export type CharacterAttributesEnum = 0 | 1 | 2 | 3; - -export type SeekTextNoteDetails = { - done: boolean; - lineHasWhitespace: boolean; - lineHasContent: boolean; - content: string; - offset: number; - remainder: number; - newlines: number; -}; +export type CharacterAttributes = 0 | 1 | 2 | 3; -- cgit v1.2.3