Skip to content

Commit 85f01ca

Browse files
authored
docs: Correct return type of Search.find() (#5711)
* Correct return type of Search.find()
1 parent ef08dfb commit 85f01ca

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class Search {
4848
/**
4949
* Searches for `options.needle`. If found, this method returns the [[Range `Range`]] where the text first occurs. If `options.backwards` is `true`, the search goes backwards in the session.
5050
* @param {EditSession} session The session to search with
51-
* @returns {Range|false}
51+
* @returns {Range | null | false}
5252
**/
5353
find(session) {
5454
var options = this.$options;

types/ace-modules.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ declare module "ace-code/src/virtual_renderer" {
890890
* @param {EditSession} session The session to associate with
891891
**/
892892
setSession(session: EditSession): void;
893-
session: import("ace-code").Ace.EditSession;
893+
session: import("ace-code/src/edit_session").EditSession;
894894
/**
895895
* Triggers a partial update of the text, from the range given by the two parameters.
896896
* @param {Number} firstRow The first row to update
@@ -1819,7 +1819,7 @@ declare module "ace-code/src/search" {
18191819
* Searches for `options.needle`. If found, this method returns the [[Range `Range`]] where the text first occurs. If `options.backwards` is `true`, the search goes backwards in the session.
18201820
* @param {EditSession} session The session to search with
18211821
**/
1822-
find(session: EditSession): Range | false;
1822+
find(session: EditSession): Range | null | false;
18231823
/**
18241824
* Searches for all occurrances `options.needle`. If found, this method returns an array of [[Range `Range`s]] where the text first occurs. If `options.backwards` is `true`, the search goes backwards in the session.
18251825
* @param {EditSession} session The session to search with

0 commit comments

Comments
 (0)