summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/js/lib.deno.shared_globals.d.ts45
-rw-r--r--deno_typescript/lib.rs3
2 files changed, 19 insertions, 29 deletions
diff --git a/cli/js/lib.deno.shared_globals.d.ts b/cli/js/lib.deno.shared_globals.d.ts
index 5fec86311..6c780857a 100644
--- a/cli/js/lib.deno.shared_globals.d.ts
+++ b/cli/js/lib.deno.shared_globals.d.ts
@@ -15,12 +15,7 @@ declare interface WindowOrWorkerGlobalScope {
// methods
atob: typeof __textEncoding.atob;
btoa: typeof __textEncoding.btoa;
- clearInterval: typeof __timers.clearInterval;
- clearTimeout: typeof __timers.clearTimeout;
fetch: typeof __fetch.fetch;
- setInterval: typeof __timers.setInterval;
- queueMicrotask: typeof __timers.queueMicrotask;
- setTimeout: typeof __timers.setTimeout;
// properties
console: __console.Console;
Blob: typeof __blob.DenoBlob;
@@ -228,12 +223,23 @@ declare namespace WebAssembly {
declare const atob: typeof __textEncoding.atob;
declare const btoa: typeof __textEncoding.btoa;
-declare const clearInterval: typeof __timers.clearInterval;
-declare const clearTimeout: typeof __timers.clearTimeout;
declare const fetch: typeof __fetch.fetch;
-declare const setInterval: typeof __timers.setInterval;
-declare const setTimeout: typeof __timers.setTimeout;
-declare const queueMicrotask: typeof __timers.queueMicrotask;
+
+/** Sets a timer which executes a function once after the timer expires. */
+declare function setTimeout(
+ cb: (...args: unknown[]) => void,
+ delay?: number,
+ ...args: unknown[]
+): number;
+/** Repeatedly calls a function , with a fixed time delay between each call. */
+declare function setInterval(
+ cb: (...args: unknown[]) => void,
+ delay?: number,
+ ...args: unknown[]
+): number;
+declare function clearTimeout(id?: number): void;
+declare function clearInterval(id?: number): void;
+declare function queueMicrotask(func: Function): void;
declare const console: __console.Console;
declare const Blob: typeof __blob.DenoBlob;
@@ -1400,25 +1406,6 @@ declare namespace __textEncoding {
}
}
-declare namespace __timers {
- export type Args = unknown[];
- /** Sets a timer which executes a function once after the timer expires. */
- export function setTimeout(
- cb: (...args: Args) => void,
- delay?: number,
- ...args: Args
- ): number;
- /** Repeatedly calls a function , with a fixed time delay between each call. */
- export function setInterval(
- cb: (...args: Args) => void,
- delay?: number,
- ...args: Args
- ): number;
- export function clearTimeout(id?: number): void;
- export function clearInterval(id?: number): void;
- export function queueMicrotask(func: Function): void;
-}
-
declare namespace __urlSearchParams {
export class URLSearchParams {
constructor(init?: string | string[][] | Record<string, string>);
diff --git a/deno_typescript/lib.rs b/deno_typescript/lib.rs
index d88932eeb..1fe81856c 100644
--- a/deno_typescript/lib.rs
+++ b/deno_typescript/lib.rs
@@ -327,6 +327,9 @@ pub fn trace_serializer() {
pub fn op_fetch_asset<S: ::std::hash::BuildHasher>(
custom_assets: HashMap<String, PathBuf, S>,
) -> impl Fn(&[u8], Option<ZeroCopyBuf>) -> CoreOp {
+ for (_, path) in custom_assets.iter() {
+ println!("cargo:rerun-if-changed={}", path.display());
+ }
move |control: &[u8], zero_copy_buf: Option<ZeroCopyBuf>| -> CoreOp {
assert!(zero_copy_buf.is_none()); // zero_copy_buf unused in this op.
let name = std::str::from_utf8(control).unwrap();