mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
Clean up how we use opIds (#4118)
This commit is contained in:
parent
805992b14a
commit
91b606aaae
74 changed files with 367 additions and 589 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue