From d2df67e8221877a14b77d5e185367717afe503f8 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 24 Oct 2018 18:54:34 +0300 Subject: [PATCH] fix typos (#1083) --- js/blob.ts | 4 ++-- js/compiler_test.ts | 2 +- js/dom_types.ts | 4 ++-- js/flatbuffers.ts | 2 +- js/timers.ts | 6 +++--- js/v8_source_maps.ts | 2 +- src/eager_unix.rs | 2 +- src/flags.rs | 2 +- src/resources.rs | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/js/blob.ts b/js/blob.ts index ecd9853ed0..b57452dd59 100644 --- a/js/blob.ts +++ b/js/blob.ts @@ -20,9 +20,9 @@ export class DenoBlob implements domTypes.Blob { } options = options || {}; - // Set ending property's default value to "tranparent". + // Set ending property's default value to "transparent". if (!options.hasOwnProperty("ending")) { - options.ending = "tranparent"; + options.ending = "transparent"; } if (options.type && !containsOnlyASCII(options.type)) { diff --git a/js/compiler_test.ts b/js/compiler_test.ts index 7d1bdc150c..6bf7ac2d65 100644 --- a/js/compiler_test.ts +++ b/js/compiler_test.ts @@ -18,7 +18,7 @@ interface ModuleInfo { const compilerInstance = DenoCompiler.instance(); -// References to orignal items we are going to mock +// References to original items we are going to mock const originals = { _globalEval: (compilerInstance as any)._globalEval, _log: (compilerInstance as any)._log, diff --git a/js/dom_types.ts b/js/dom_types.ts index 3435825b13..bd73639ceb 100644 --- a/js/dom_types.ts +++ b/js/dom_types.ts @@ -59,7 +59,7 @@ export interface HTMLFormElement { // TODO } -type EndingType = "tranparent" | "native"; +type EndingType = "transparent" | "native"; export interface BlobPropertyBag { type?: string; @@ -440,7 +440,7 @@ export interface Request extends Body { */ readonly integrity: string; /** Returns a boolean indicating whether or not request is for a history - * navigation (a.k.a. back-foward navigation). + * navigation (a.k.a. back-forward navigation). */ readonly isHistoryNavigation: boolean; /** Returns a boolean indicating whether or not request is for a reload diff --git a/js/flatbuffers.ts b/js/flatbuffers.ts index bfb71f9d1a..926cb74251 100644 --- a/js/flatbuffers.ts +++ b/js/flatbuffers.ts @@ -15,7 +15,7 @@ globalBuilder.inUse = false; // This is a wrapper around the real Builder . // The purpose is to reuse a single ArrayBuffer for every message. // We can do this because the "control" messages sent to the privileged -// side are guarenteed to be used during the call to libdeno.send(). +// side are guaranteed to be used during the call to libdeno.send(). export function createBuilder(): Builder { // tslint:disable-next-line:no-any const gb = globalBuilder as any; diff --git a/js/timers.ts b/js/timers.ts index 292f1c6134..83f285f12d 100644 --- a/js/timers.ts +++ b/js/timers.ts @@ -23,7 +23,7 @@ interface Timer { // about a month, this is no longer true, and Deno explodes. // TODO(piscisaureus): fix that ^. const EPOCH = Date.now(); -const APOCALYPS = 2 ** 32 - 2; +const APOCALYPSE = 2 ** 32 - 2; let globalTimeoutDue: number | null = null; @@ -34,7 +34,7 @@ const dueMap: { [due: number]: Timer[] } = Object.create(null); function getTime() { // TODO: use a monotonic clock. const now = Date.now() - EPOCH; - assert(now >= 0 && now < APOCALYPS); + assert(now >= 0 && now < APOCALYPSE); return now; } @@ -175,7 +175,7 @@ function setTimer>( ): number { // If any `args` were provided (which is uncommon), bind them to the callback. const callback: () => void = args.length === 0 ? cb : cb.bind(null, ...args); - // In the browser, the delay value must be coercable to an integer between 0 + // In the browser, the delay value must be coercible to an integer between 0 // and INT32_MAX. Any other value will cause the timer to fire immediately. // We emulate this behavior. const now = getTime(); diff --git a/js/v8_source_maps.ts b/js/v8_source_maps.ts index bb7424f0b4..f73cc2d381 100644 --- a/js/v8_source_maps.ts +++ b/js/v8_source_maps.ts @@ -149,7 +149,7 @@ function CallSiteToString(frame: CallSite): string { const isMethodCall = !(frame.isToplevel() || isConstructor); if (isMethodCall) { let typeName = frame.getTypeName(); - // Fixes shim to be backward compatable with Node v0 to v4 + // Fixes shim to be backward compatible with Node v0 to v4 if (typeName === "[object Object]") { typeName = "null"; } diff --git a/src/eager_unix.rs b/src/eager_unix.rs index 8646e2b236..85f4106c4f 100644 --- a/src/eager_unix.rs +++ b/src/eager_unix.rs @@ -17,7 +17,7 @@ pub fn tcp_read>( resource: Resource, mut buf: T, ) -> EagerRead { - // Unforunately we can't just call read() on tokio::net::TcpStream + // Unfortunately we can't just call read() on tokio::net::TcpStream let fd = (*tcp_stream).as_raw_fd(); let mut std_tcp_stream = unsafe { std::net::TcpStream::from_raw_fd(fd) }; let read_result = std_tcp_stream.read(buf.as_mut()); diff --git a/src/flags.rs b/src/flags.rs index c5ce8643bd..2a279ea9e9 100644 --- a/src/flags.rs +++ b/src/flags.rs @@ -257,7 +257,7 @@ fn test_v8_set_flags_preprocess_2() { pub fn v8_set_flags(args: Vec) -> Vec { // deno_set_v8_flags(int* argc, char** argv) mutates argc and argv to remove // flags that v8 understands. - // First parse core args, then converto to a vector of C strings. + // First parse core args, then convert to a vector of C strings. let (argv, rest) = v8_set_flags_preprocess(args); let mut argv = argv .iter() diff --git a/src/resources.rs b/src/resources.rs index 5a41ee2db0..a959d5c556 100644 --- a/src/resources.rs +++ b/src/resources.rs @@ -1,7 +1,7 @@ // Copyright 2018 the Deno authors. All rights reserved. MIT license. // Think of Resources as File Descriptors. They are integers that are allocated -// by the privlaged side of Deno to refer to various resources. The simplest +// by the privileged side of Deno to refer to various resources. The simplest // example are standard file system files and stdio - but there will be other // resources added in the future that might not correspond to operating system // level File Descriptors. To avoid confusion we call them "resources" not "file