Skip to content

Commit

Permalink
docs: Correct return type of Search.find() (#5711)
Browse files Browse the repository at this point in the history
* Correct return type of Search.find()
  • Loading branch information
ferdnyc authored Jan 13, 2025
1 parent ef08dfb commit 85f01ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Search {
/**
* 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.
* @param {EditSession} session The session to search with
* @returns {Range|false}
* @returns {Range | null | false}
**/
find(session) {
var options = this.$options;
Expand Down
4 changes: 2 additions & 2 deletions types/ace-modules.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ declare module "ace-code/src/virtual_renderer" {
* @param {EditSession} session The session to associate with
**/
setSession(session: EditSession): void;
session: import("ace-code").Ace.EditSession;
session: import("ace-code/src/edit_session").EditSession;
/**
* Triggers a partial update of the text, from the range given by the two parameters.
* @param {Number} firstRow The first row to update
Expand Down Expand Up @@ -1819,7 +1819,7 @@ declare module "ace-code/src/search" {
* 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.
* @param {EditSession} session The session to search with
**/
find(session: EditSession): Range | false;
find(session: EditSession): Range | null | false;
/**
* 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.
* @param {EditSession} session The session to search with
Expand Down

0 comments on commit 85f01ca

Please sign in to comment.