Skip to content

Commit

Permalink
Fixed Wrong Indentation (#4)
Browse files Browse the repository at this point in the history
- Updated formatting to use four spaces for indentation.

    - Not sure why I had `useTabs: true` originally. Probably just copied from a template and forgot to change.
  • Loading branch information
novacbn authored Aug 12, 2023
1 parent ed43e36 commit cc02d19
Show file tree
Hide file tree
Showing 110 changed files with 6,331 additions and 6,331 deletions.
18 changes: 9 additions & 9 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"arrowParens": "always",
"bracketSpacing": false,
"endOfLine": "lf",
"printWidth": 80,
"proseWrap": "preserve",
"semi": true,
"singleQuote": false,
"tabWidth": 4,
"useTabs": false
"arrowParens": "always",
"bracketSpacing": false,
"endOfLine": "lf",
"printWidth": 80,
"proseWrap": "preserve",
"semi": true,
"singleQuote": false,
"tabWidth": 4,
"useTabs": false
}
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["denoland.vscode-deno", "esbenp.prettier-vscode"]
"recommendations": ["denoland.vscode-deno", "esbenp.prettier-vscode"]
}
52 changes: 26 additions & 26 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
{
"deno.enable": true,
"deno.lint": true,
"deno.enable": true,
"deno.lint": true,

"[javascript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[javascript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "denoland.vscode-deno"
},

"[json]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[json]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "denoland.vscode-deno"
},

"[jsonc]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[jsonc]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "denoland.vscode-deno"
},

"[markdown]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[markdown]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "denoland.vscode-deno"
},

"[typescript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[typescript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "denoland.vscode-deno"
},

"[yaml]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
"[yaml]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
8 changes: 4 additions & 4 deletions async/iterable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
* ```
*/
export async function arrayFromIterable<Value>(
iterable: AsyncIterable<Value>,
iterable: AsyncIterable<Value>,
): Promise<Value[]> {
const values = [];
const values = [];

for await (const value of iterable) values.push(value);
for await (const value of iterable) values.push(value);

return values;
return values;
}
30 changes: 15 additions & 15 deletions async/promise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* ```
*/
export type Promisify<Value> = Value extends Promise<unknown> ? Value
: Promise<Value>;
: Promise<Value>;

/**
* Returns a `Promise` instance along with its resolve and reject functions.
Expand Down Expand Up @@ -44,21 +44,21 @@ export type Promisify<Value> = Value extends Promise<unknown> ? Value
* ```
*/
export function makePromise<Value = void>(): {
promise: Promise<Value>;
resolve: (value: Value) => void;
reject: (reason?: unknown) => void;
promise: Promise<Value>;
resolve: (value: Value) => void;
reject: (reason?: unknown) => void;
} {
let resolve: (value: Value) => void;
let reject: (reason?: unknown) => void;
let resolve: (value: Value) => void;
let reject: (reason?: unknown) => void;

const promise = new Promise<Value>((_resolve, _reject) => {
resolve = _resolve;
reject = _reject;
});
const promise = new Promise<Value>((_resolve, _reject) => {
resolve = _resolve;
reject = _reject;
});

return {
resolve: resolve!,
reject: reject!,
promise,
};
return {
resolve: resolve!,
reject: reject!,
promise,
};
}
16 changes: 8 additions & 8 deletions collections/class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import { OmitValues, PickValues } from './object.ts';
* ```
*/
export type MethodsOf<Cls> = PickValues<
Cls,
// HACK: We need to use an "any function" to catch all functions.
// deno-lint-ignore ban-types
Function
Cls,
// HACK: We need to use an "any function" to catch all functions.
// deno-lint-ignore ban-types
Function
>;

/**
Expand All @@ -52,8 +52,8 @@ export type MethodsOf<Cls> = PickValues<
* ```
*/
export type PropertiesOf<Cls> = OmitValues<
Cls,
// HACK: We need to use an "any function" to catch all functions.
// deno-lint-ignore ban-types
Function
Cls,
// HACK: We need to use an "any function" to catch all functions.
// deno-lint-ignore ban-types
Function
>;
4 changes: 2 additions & 2 deletions collections/object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export type EmptyObject = Record<PropertyKey, never>;
* type FilteredValues = PickValues<typeof MY_CONSTANT_OBJECT, number>; // `{ readonly myNumber: 42; readonly otherNumber: 84; }`
*/
export type PickValues<Obj, Value> = {
[Key in keyof Obj as Obj[Key] extends Value ? Key : never]: Obj[Key];
[Key in keyof Obj as Obj[Key] extends Value ? Key : never]: Obj[Key];
};

/**
Expand All @@ -53,7 +53,7 @@ export type PickValues<Obj, Value> = {
* type FilteredValues = OmitValues<typeof MY_CONSTANT_OBJECT, number>; // `{ readonly myBoolean: false; readonly myString: "Hello World"; }`
*/
export type OmitValues<Obj, Value> = {
[Key in keyof Obj as Obj[Key] extends Value ? never : Key]: Obj[Key];
[Key in keyof Obj as Obj[Key] extends Value ? never : Key]: Obj[Key];
};

/**
Expand Down
Loading

0 comments on commit cc02d19

Please sign in to comment.