Fix eslint warnings (#2151)

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: LE GOFF Vincent <g_n_s@hotmail.fr>
This commit is contained in:
Ryan Dahl 2019-04-21 16:40:10 -04:00 committed by GitHub
parent 6cded14bdf
commit 9dfebbc949
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
75 changed files with 1110 additions and 931 deletions

View file

@ -349,7 +349,7 @@ class Compiler implements ts.LanguageServiceHost, ts.FormatDiagnosticsHost {
// so we will ignore complaints about this compiler setting.
...service
.getCompilerOptionsDiagnostics()
.filter(diagnostic => diagnostic.code !== 5070),
.filter((diagnostic): boolean => diagnostic.code !== 5070),
...service.getSyntacticDiagnostics(fileName),
...service.getSemanticDiagnostics(fileName)
];
@ -519,9 +519,9 @@ window.TextEncoder = TextEncoder;
// provide the "main" function that will be called by the privileged side when
// lazy instantiating the compiler web worker
window.compilerMain = function compilerMain() {
window.compilerMain = function compilerMain(): void {
// workerMain should have already been called since a compiler is a worker.
window.onmessage = ({ data }: { data: CompilerLookup }) => {
window.onmessage = ({ data }: { data: CompilerLookup }): void => {
const { specifier, referrer, cmdId } = data;
try {