File tree Expand file tree Collapse file tree 7 files changed +11
-12
lines changed
extensionHostWorker/common
embed/components/Content/Monaco Expand file tree Collapse file tree 7 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -363,6 +363,7 @@ class Live {
363363 } else {
364364 // we might try to send messages even when not on live, just
365365 // ignore it
366+ // @ts -ignore this is probably not safe but whatever
366367 resolve ( undefined ) ;
367368 }
368369 } ) ;
Original file line number Diff line number Diff line change @@ -7,9 +7,7 @@ import LinterWorker from 'worker-loader?publicPath=/&name=monaco-linter.[hash:8]
77import { getCurrentModelPath } from './utils' ;
88
99const requireAMDModule = paths =>
10- new Promise ( resolve =>
11- ( window as any ) . require ( paths , ( ) => resolve ( undefined ) )
12- ) ;
10+ new Promise < void > ( resolve => ( window as any ) . require ( paths , ( ) => resolve ( ) ) ) ;
1311
1412export class Linter {
1513 private worker : LinterWorker ;
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ export async function initializeBrowserFS({
6767 } ;
6868 } = { } ;
6969
70- return new Promise ( resolve => {
70+ return new Promise < void > ( resolve => {
7171 const config = { ...BROWSER_FS_CONFIG } ;
7272 let currentSandboxFs = { } ;
7373
@@ -129,12 +129,12 @@ export async function initializeBrowserFS({
129129 // Resolve after 3s, if it doesn't resolve, vscode won't be able to resolve the ext host
130130 // and it won't try to reconnect.
131131 const timeout = setTimeout ( ( ) => {
132- resolve ( undefined ) ;
132+ resolve ( ) ;
133133 } , 3000 ) ;
134134
135135 const callResolve = ( ) => {
136136 clearTimeout ( timeout ) ;
137- resolve ( undefined ) ;
137+ resolve ( ) ;
138138 } ;
139139
140140 self . addEventListener ( 'message' , evt => {
@@ -234,7 +234,7 @@ export async function initializeBrowserFS({
234234 $data : { } ,
235235 } ) ;
236236 } else {
237- resolve ( undefined ) ;
237+ resolve ( ) ;
238238 }
239239 } ) ;
240240 } ) ;
Original file line number Diff line number Diff line change @@ -40,11 +40,11 @@ export const initializeGlobals = () => {
4040
4141export function initializeAll ( ) {
4242 // eslint-disable-next-line no-async-promise-executor
43- return new Promise ( async resolve => {
43+ return new Promise < void > ( async resolve => {
4444 await initializePolyfills ( ) ;
4545 loadBrowserFS ( ) ;
4646 initializeGlobals ( ) ;
4747
48- resolve ( undefined ) ;
48+ resolve ( ) ;
4949 } ) ;
5050}
Original file line number Diff line number Diff line change 11const requireAMDModule = paths =>
2- new Promise ( resolve => ( window as any ) . require ( paths , ( ) => resolve ( ) ) ) ;
2+ new Promise < void > ( resolve => ( window as any ) . require ( paths , ( ) => resolve ( ) ) ) ;
33
44export default async ( title : string , monaco ) => {
55 if ( title == null ) return 'javascript' ;
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export default function createOverlay(modules) {
1414
1515 const parameters = getParameters ( { files : normalized } ) ;
1616
17- return new Promise ( resolve => {
17+ return new Promise < void > ( resolve => {
1818 const iframe = document . createElement ( 'iframe' ) ;
1919
2020 iframe . setAttribute (
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ expect.extend({
4040expect . addSnapshotSerializer = addSerializer ;
4141
4242function addScript ( src : string ) {
43- return new Promise ( ( resolve , reject ) => {
43+ return new Promise < void > ( ( resolve , reject ) => {
4444 const s = document . createElement ( 'script' ) ;
4545 s . setAttribute ( 'src' , src ) ;
4646 document . body . appendChild ( s ) ;
You can’t perform that action at this time.
0 commit comments