Skip to content

Update typings in model.ts to allow nulls#44353

Merged
alexdima merged 2 commits intomicrosoft:masterfrom
rcjsuen:patch-1
Mar 1, 2018
Merged

Update typings in model.ts to allow nulls#44353
alexdima merged 2 commits intomicrosoft:masterfrom
rcjsuen:patch-1

Conversation

@rcjsuen
Copy link
Contributor

@rcjsuen rcjsuen commented Feb 25, 2018

The searching functions in ITextModel allow one of its parameters to be null but the typings do not have this declared. The parameter is defined as string instead of string | null. If someone is compiling code in strict null checking mode then a false positive error will be flagged.

See microsoft/monaco-editor#580.

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: Remy Suen <[email protected]>
@rcjsuen
Copy link
Contributor Author

rcjsuen commented Feb 25, 2018

Looks like it's no good. I'll try a new fix later.

[09:38:16] Error: monaco.d.ts is no longer up to date. Please run gulp watch and commit the new file.
    at formatError (C:\projects\vscode\node_modules\gulp\bin\gulp.js:169:10)
    at Gulp.<anonymous> (C:\projects\vscode\node_modules\gulp\bin\gulp.js:195:15)
    at emitOne (events.js:116:13)
    at Gulp.emit (events.js:211:7)
    at Gulp.Orchestrator._emitTaskDone (C:\projects\vscode\node_modules\orchestrator\index.js:264:8)
    at C:\projects\vscode\node_modules\orchestrator\index.js:275:23
    at finish (C:\projects\vscode\node_modules\orchestrator\lib\runTask.js:21:8)
    at Stream.<anonymous> (C:\projects\vscode\node_modules\orchestrator\lib\runTask.js:52:4)
    at Stream.f (C:\projects\vscode\node_modules\orchestrator\node_modules\once\once.js:17:25)
    at emitOne (events.js:121:20)
    at Stream.emit (events.js:211:7)
    at run (C:\projects\vscode\build\lib\compilation.js:124:30)
    at setInputFile (C:\projects\vscode\build\lib\compilation.js:114:13)
    at Stream.<anonymous> (C:\projects\vscode\build\lib\compilation.js:137:13)
    at Stream.stream.write (C:\projects\vscode\node_modules\through\index.js:26:11)
    at Stream.ondata (internal/streams/legacy.js:16:26)
[09:38:16] Finished compilation with 0 errors after 86207 ms

@alexdima
Copy link
Member

alexdima commented Mar 1, 2018

@rcjsuen We are generating the file monaco.d.ts from the sources, and then we are including it in the repository, so when you compile vscode locally, you have to check that file in too.

@alexdima alexdima added this to the February 2018 milestone Mar 1, 2018
@alexdima alexdima merged commit 2db3001 into microsoft:master Mar 1, 2018
@rcjsuen rcjsuen deleted the patch-1 branch March 1, 2018 10:01
@rcjsuen
Copy link
Contributor Author

rcjsuen commented Mar 1, 2018

Thank you for finishing this up for me, @alexandrudima!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants