mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 15:06:54 -05:00
typos (#7082)
This commit is contained in:
parent
684eddcc6b
commit
68e1ba07d3
7 changed files with 15 additions and 15 deletions
|
@ -34,7 +34,7 @@ Format the code:
|
|||
|
||||
### Profiling
|
||||
|
||||
To start profiling,
|
||||
To start profiling:
|
||||
|
||||
```sh
|
||||
# Make sure we're only building release.
|
||||
|
@ -107,7 +107,7 @@ Current executable set to '../deno/target/debug/deno' (x86_64).
|
|||
|
||||
### V8 flags
|
||||
|
||||
V8 has many many internal command-line flags.
|
||||
V8 has many many internal command-line flags:
|
||||
|
||||
```shell
|
||||
$ deno run --v8-flags=--help _
|
||||
|
|
|
@ -49,7 +49,7 @@ https://chromium.googlesource.com/chromium/src/+/master/styleguide/inclusive_cod
|
|||
|
||||
Follow Rust conventions and be consistent with existing code.
|
||||
|
||||
## Typescript
|
||||
## TypeScript
|
||||
|
||||
The TypeScript portions of the codebase include `cli/js` for the built-ins and
|
||||
the standard library `std`.
|
||||
|
@ -90,7 +90,7 @@ When designing function interfaces, stick to the following rules.
|
|||
Other arguments can be objects, but they must be distinguishable from a
|
||||
'plain' Object runtime, by having either:
|
||||
|
||||
- a distinguishing prototype (e.g. `Array`, `Map`, `Date`, `class MyThing`)
|
||||
- a distinguishing prototype (e.g. `Array`, `Map`, `Date`, `class MyThing`).
|
||||
- a well-known symbol property (e.g. an iterable with `Symbol.iterator`).
|
||||
|
||||
This allows the API to evolve in a backwards compatible way, even when the
|
||||
|
@ -235,7 +235,7 @@ comments should be written as:
|
|||
/** This is a good single line JSDoc. */
|
||||
```
|
||||
|
||||
And not
|
||||
And not:
|
||||
|
||||
```ts
|
||||
/**
|
||||
|
@ -291,7 +291,7 @@ Deno.test("myTestFunction", function () {
|
|||
Top level functions should use the `function` keyword. Arrow syntax should be
|
||||
limited to closures.
|
||||
|
||||
Bad
|
||||
Bad:
|
||||
|
||||
```ts
|
||||
export const foo = (): string => {
|
||||
|
@ -299,7 +299,7 @@ export const foo = (): string => {
|
|||
};
|
||||
```
|
||||
|
||||
Good
|
||||
Good:
|
||||
|
||||
```ts
|
||||
export function foo(): string {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
### File system events
|
||||
## File system events
|
||||
|
||||
To poll for file system events:
|
||||
|
||||
|
|
|
@ -202,7 +202,7 @@ errors logged as part of the compilation.
|
|||
#### Using the triple slash reference
|
||||
|
||||
You do not have to specify the `lib` in the compiler options. Deno also supports
|
||||
[the triple-slash reference to a lib](https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html#-reference-lib-).
|
||||
[the triple-slash reference to a lib](https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html#-reference-lib-)
|
||||
which can be embedded in the contents of the file. For example, if you have a
|
||||
`main.ts` like:
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ Open `chrome://inspect` and click `Inspect` next to target:
|
|||
|
||||
![chrome://inspect](../images/debugger1.jpg)
|
||||
|
||||
It might take a few seconds after opening the devtools to load all modules.
|
||||
It might take a few seconds after opening the Devtools to load all modules.
|
||||
|
||||
![Devtools opened](../images/debugger2.jpg)
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ deno lint --unstable myfile1.ts myfile2.ts
|
|||
#### Files
|
||||
|
||||
To ignore whole file `// deno-lint-ignore-file` directive should placed at the
|
||||
top of the file.
|
||||
top of the file:
|
||||
|
||||
```ts
|
||||
// deno-lint-ignore-file
|
||||
|
@ -93,7 +93,7 @@ function foo(): any {
|
|||
#### Diagnostics
|
||||
|
||||
To ignore certain diagnostic `// deno-lint-ignore <codes...>` directive should
|
||||
be placed before offending line. Specifying ignored rule name is required.
|
||||
be placed before offending line. Specifying ignored rule name is required:
|
||||
|
||||
```ts
|
||||
// deno-lint-ignore no-explicit-any
|
||||
|
@ -109,7 +109,7 @@ function bar(a: any) {
|
|||
|
||||
To provide some compatibility with ESLint `deno lint` also supports
|
||||
`// eslint-ignore-next-line` directive. Just like with `// deno-lint-ignore`,
|
||||
it's required to specify the ignored rule name.
|
||||
it's required to specify the ignored rule name:
|
||||
|
||||
```ts
|
||||
// eslint-ignore-next-line no-empty
|
||||
|
|
Loading…
Reference in a new issue