mirror of
https://github.com/denoland/deno.git
synced 2025-03-04 01:44:26 -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
|
### Profiling
|
||||||
|
|
||||||
To start profiling,
|
To start profiling:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Make sure we're only building release.
|
# Make sure we're only building release.
|
||||||
|
@ -107,7 +107,7 @@ Current executable set to '../deno/target/debug/deno' (x86_64).
|
||||||
|
|
||||||
### V8 flags
|
### V8 flags
|
||||||
|
|
||||||
V8 has many many internal command-line flags.
|
V8 has many many internal command-line flags:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ deno run --v8-flags=--help _
|
$ 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.
|
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 TypeScript portions of the codebase include `cli/js` for the built-ins and
|
||||||
the standard library `std`.
|
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
|
Other arguments can be objects, but they must be distinguishable from a
|
||||||
'plain' Object runtime, by having either:
|
'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`).
|
- 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
|
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. */
|
/** This is a good single line JSDoc. */
|
||||||
```
|
```
|
||||||
|
|
||||||
And not
|
And not:
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
/**
|
/**
|
||||||
|
@ -291,7 +291,7 @@ Deno.test("myTestFunction", function () {
|
||||||
Top level functions should use the `function` keyword. Arrow syntax should be
|
Top level functions should use the `function` keyword. Arrow syntax should be
|
||||||
limited to closures.
|
limited to closures.
|
||||||
|
|
||||||
Bad
|
Bad:
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
export const foo = (): string => {
|
export const foo = (): string => {
|
||||||
|
@ -299,7 +299,7 @@ export const foo = (): string => {
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
Good
|
Good:
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
export function foo(): string {
|
export function foo(): string {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
### File system events
|
## File system events
|
||||||
|
|
||||||
To poll for 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
|
#### Using the triple slash reference
|
||||||
|
|
||||||
You do not have to specify the `lib` in the compiler options. Deno also supports
|
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
|
which can be embedded in the contents of the file. For example, if you have a
|
||||||
`main.ts` like:
|
`main.ts` like:
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ Open `chrome://inspect` and click `Inspect` next to target:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ deno lint --unstable myfile1.ts myfile2.ts
|
||||||
#### Files
|
#### Files
|
||||||
|
|
||||||
To ignore whole file `// deno-lint-ignore-file` directive should placed at the
|
To ignore whole file `// deno-lint-ignore-file` directive should placed at the
|
||||||
top of the file.
|
top of the file:
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
// deno-lint-ignore-file
|
// deno-lint-ignore-file
|
||||||
|
@ -93,7 +93,7 @@ function foo(): any {
|
||||||
#### Diagnostics
|
#### Diagnostics
|
||||||
|
|
||||||
To ignore certain diagnostic `// deno-lint-ignore <codes...>` directive should
|
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
|
```ts
|
||||||
// deno-lint-ignore no-explicit-any
|
// deno-lint-ignore no-explicit-any
|
||||||
|
@ -109,7 +109,7 @@ function bar(a: any) {
|
||||||
|
|
||||||
To provide some compatibility with ESLint `deno lint` also supports
|
To provide some compatibility with ESLint `deno lint` also supports
|
||||||
`// eslint-ignore-next-line` directive. Just like with `// deno-lint-ignore`,
|
`// 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
|
```ts
|
||||||
// eslint-ignore-next-line no-empty
|
// eslint-ignore-next-line no-empty
|
||||||
|
|
Loading…
Add table
Reference in a new issue