未验证 提交 18c5888b 编写于 作者: R Remy Suen 提交者: GitHub

Update typings in model.ts to allow nulls

The searching functions in ITextModel allow one of its parameters to
be null but the typings does not have this declared. If someone is
compiling code in strict null checking mode then a false positive
error will be flagged.
Signed-off-by: NRemy Suen <remy.suen@gmail.com>
上级 90316996
...@@ -666,7 +666,7 @@ export interface ITextModel { ...@@ -666,7 +666,7 @@ export interface ITextModel {
* @param limitResultCount Limit the number of results * @param limitResultCount Limit the number of results
* @return The ranges where the matches are. It is empty if not matches have been found. * @return The ranges where the matches are. It is empty if not matches have been found.
*/ */
findMatches(searchString: string, searchOnlyEditableRange: boolean, isRegex: boolean, matchCase: boolean, wordSeparators: string, captureMatches: boolean, limitResultCount?: number): FindMatch[]; findMatches(searchString: string, searchOnlyEditableRange: boolean, isRegex: boolean, matchCase: boolean, wordSeparators: string | null, captureMatches: boolean, limitResultCount?: number): FindMatch[];
/** /**
* Search the model. * Search the model.
* @param searchString The string used to search. If it is a regular expression, set `isRegex` to true. * @param searchString The string used to search. If it is a regular expression, set `isRegex` to true.
...@@ -678,7 +678,7 @@ export interface ITextModel { ...@@ -678,7 +678,7 @@ export interface ITextModel {
* @param limitResultCount Limit the number of results * @param limitResultCount Limit the number of results
* @return The ranges where the matches are. It is empty if no matches have been found. * @return The ranges where the matches are. It is empty if no matches have been found.
*/ */
findMatches(searchString: string, searchScope: IRange, isRegex: boolean, matchCase: boolean, wordSeparators: string, captureMatches: boolean, limitResultCount?: number): FindMatch[]; findMatches(searchString: string, searchScope: IRange, isRegex: boolean, matchCase: boolean, wordSeparators: string | null, captureMatches: boolean, limitResultCount?: number): FindMatch[];
/** /**
* Search the model for the next match. Loops to the beginning of the model if needed. * Search the model for the next match. Loops to the beginning of the model if needed.
* @param searchString The string used to search. If it is a regular expression, set `isRegex` to true. * @param searchString The string used to search. If it is a regular expression, set `isRegex` to true.
...@@ -689,7 +689,7 @@ export interface ITextModel { ...@@ -689,7 +689,7 @@ export interface ITextModel {
* @param captureMatches The result will contain the captured groups. * @param captureMatches The result will contain the captured groups.
* @return The range where the next match is. It is null if no next match has been found. * @return The range where the next match is. It is null if no next match has been found.
*/ */
findNextMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wordSeparators: string, captureMatches: boolean): FindMatch; findNextMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wordSeparators: string | null, captureMatches: boolean): FindMatch;
/** /**
* Search the model for the previous match. Loops to the end of the model if needed. * Search the model for the previous match. Loops to the end of the model if needed.
* @param searchString The string used to search. If it is a regular expression, set `isRegex` to true. * @param searchString The string used to search. If it is a regular expression, set `isRegex` to true.
...@@ -700,7 +700,7 @@ export interface ITextModel { ...@@ -700,7 +700,7 @@ export interface ITextModel {
* @param captureMatches The result will contain the captured groups. * @param captureMatches The result will contain the captured groups.
* @return The range where the previous match is. It is null if no previous match has been found. * @return The range where the previous match is. It is null if no previous match has been found.
*/ */
findPreviousMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wordSeparators: string, captureMatches: boolean): FindMatch; findPreviousMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wordSeparators: string | null, captureMatches: boolean): FindMatch;
/** /**
* Get the language associated with this model. * Get the language associated with this model.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册