From eceb7979eaf524d03ba2b94fdc6b9500c9cb7db4 Mon Sep 17 00:00:00 2001 From: Noah Allen Date: Thu, 6 Apr 2023 17:52:35 -0700 Subject: [PATCH] Remove non nullable type that wasn't needed --- packages/rich-text/README.md | 2 +- packages/rich-text/src/insert.js | 14 ++++---------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/packages/rich-text/README.md b/packages/rich-text/README.md index bef11c7e7a127b..1b53f9dff3cc93 100644 --- a/packages/rich-text/README.md +++ b/packages/rich-text/README.md @@ -260,7 +260,7 @@ none are provided. _Parameters_ -- _value_ `RichTextValue & RichTextNonNullable`: Value to modify. +- _value_ `RichTextValue`: Value to modify. - _valueToInsert_ `RichTextValue|string`: Value to insert. - _startIndex_ `[number]`: Start index. - _endIndex_ `[number]`: End index. diff --git a/packages/rich-text/src/insert.js b/packages/rich-text/src/insert.js index 29dd94de1d2da4..888e32bdc0dacc 100644 --- a/packages/rich-text/src/insert.js +++ b/packages/rich-text/src/insert.js @@ -7,22 +7,16 @@ import { normaliseFormats } from './normalise-formats'; /** @typedef {import('./create').RichTextValue} RichTextValue */ -/** - * @typedef RichTextNonNullable - * @property {NonNullable< RichTextValue[ 'start' ] >} start Start index. - * @property {NonNullable< RichTextValue[ 'end' ] >} end End index. - */ - /** * Insert a Rich Text value, an HTML string, or a plain text string, into a * Rich Text value at the given `startIndex`. Any content between `startIndex` * and `endIndex` will be removed. Indices are retrieved from the selection if * none are provided. * - * @param {RichTextValue & RichTextNonNullable} value Value to modify. - * @param {RichTextValue|string} valueToInsert Value to insert. - * @param {number} [startIndex] Start index. - * @param {number} [endIndex] End index. + * @param {RichTextValue} value Value to modify. + * @param {RichTextValue|string} valueToInsert Value to insert. + * @param {number} [startIndex] Start index. + * @param {number} [endIndex] End index. * * @return {RichTextValue} A new value with the value inserted. */