Clean up how we use opIds (#4118)

This commit is contained in:
Ryan Dahl 2020-02-25 09:14:27 -05:00 committed by GitHub
parent 805992b14a
commit 91b606aaae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
74 changed files with 367 additions and 589 deletions

View file

@ -4,7 +4,6 @@
// compiler within Deno.
import { DiagnosticItem } from "./diagnostics.ts";
import * as dispatch from "./dispatch.ts";
import { sendAsync } from "./dispatch_json.ts";
import * as util from "./util.ts";
@ -296,9 +295,7 @@ export function transpileOnly(
sources,
options: options ? JSON.stringify(options) : undefined
};
return sendAsync(dispatch.OP_TRANSPILE, payload).then(result =>
JSON.parse(result)
);
return sendAsync("op_transpile", payload).then(result => JSON.parse(result));
}
/** Takes a root module name, any optionally a record set of sources. Resolves
@ -344,9 +341,7 @@ export function compile(
sources: !!sources,
options
});
return sendAsync(dispatch.OP_COMPILE, payload).then(result =>
JSON.parse(result)
);
return sendAsync("op_compile", payload).then(result => JSON.parse(result));
}
/** Takes a root module name, and optionally a record set of sources. Resolves
@ -393,7 +388,5 @@ export function bundle(
sources: !!sources,
options
});
return sendAsync(dispatch.OP_COMPILE, payload).then(result =>
JSON.parse(result)
);
return sendAsync("op_compile", payload).then(result => JSON.parse(result));
}