diff --git a/src/search.js b/src/search.js index 17a7c63222..dad3434b90 100644 --- a/src/search.js +++ b/src/search.js @@ -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; diff --git a/types/ace-modules.d.ts b/types/ace-modules.d.ts index 7ddb7e1438..683ab1fb43 100644 --- a/types/ace-modules.d.ts +++ b/types/ace-modules.d.ts @@ -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 @@ -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