Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions @coven/cron/Field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,4 @@ import type { ValueOrRangeField } from "./ValueOrRangeField.ts";
* @see {@linkcode ListField}
*/
export type Field<Value extends number> =
| AllToken
| ListField<Value>
| ValueOrRangeField<Value>;
AllToken | ListField<Value> | ValueOrRangeField<Value>;
2 changes: 1 addition & 1 deletion @coven/iterables/async/initial.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const initial = <Iterable extends AwaitableIterable>(
let item = await iterator.next();

// deno-lint-ignore coven/no-for
for (; !item.done; ) {
for (; !item.done;) {
const value = item.value;

// deno-lint-ignore no-await-in-loop
Expand Down
2 changes: 1 addition & 1 deletion @coven/iterables/initial.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const initial = <IterableToGetInitial extends Iterable<unknown>>(
const iterator = getIterator(iterable);

// deno-lint-ignore coven/no-for
for (let item = iterator.next(); !item.done; ) {
for (let item = iterator.next(); !item.done;) {
const value = item.value;

item = iterator.next();
Expand Down
3 changes: 1 addition & 2 deletions @coven/math/PreciseString.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
* Possible `string` representations of `Precise`.
*/
export type PreciseString =
| "NaN"
| `${"-" | ""}${`${bigint}` | `${bigint}.${bigint}`}`;
"NaN" | `${"-" | ""}${`${bigint}` | `${bigint}.${bigint}`}`;
2 changes: 1 addition & 1 deletion @coven/math/preciseRound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const preciseRound: Unary<[precise: Precise], Precise> = memoFunction(
let coefficient = getPreciseCoefficient(value);

// deno-lint-ignore coven/no-for
for (; exponent < 0n; ) {
for (; exponent < 0n;) {
const rem = coefficient % 10n;
coefficient /= 10n;
exponent += 1n;
Expand Down
2 changes: 1 addition & 1 deletion @coven/math/preciseTruncate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const preciseTruncate: Unary<[precise: Precise], Precise> = memoFunction(
let coefficient = getPreciseCoefficient(value);

// deno-lint-ignore coven/no-for
for (; exponent < 0n; ) {
for (; exponent < 0n;) {
coefficient /= 10n;
exponent += 1n;
}
Expand Down
3 changes: 1 addition & 2 deletions @coven/template/TemplateHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@ import type { Stringable, TypeOfDictionary } from "@coven/types";
*/
export type TemplateHandlers = {
readonly [Key in keyof TypeOfDictionary]?:
| ((expression: TypeOfDictionary[Key]) => Stringable)
| Stringable;
((expression: TypeOfDictionary[Key]) => Stringable) | Stringable;
};
20 changes: 11 additions & 9 deletions @coven/types/EntryOf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ import type { ReadonlyArrayLike } from "./ReadonlyArrayLike.ts";
* @see {@linkcode ReadonlyArrayLike}
* @template Object Object to get the entry from.
*/
export type EntryOf<Object extends object> = Readonly<{
/**
* @see {@linkcode EntryOf} property that shouldn't be referenced directly
*/
[Property in keyof Object]: Entry<
NormalizeEntryKey<Property>,
Object extends ReadonlyArrayLike ? Object[number] : Object[Property]
>;
}>[keyof Object];
export type EntryOf<Object extends object> = Readonly<
{
/**
* @see {@linkcode EntryOf} property that shouldn't be referenced directly
*/
[Property in keyof Object]: Entry<
NormalizeEntryKey<Property>,
Object extends ReadonlyArrayLike ? Object[number] : Object[Property]
>;
}
>[keyof Object];
4 changes: 1 addition & 3 deletions @coven/types/ISODayOfMonth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,4 @@ import type { Digit } from "./Digit.ts";
* @see {@linkcode https://coven.to/mdn/Date Date}
*/
export type ISODayOfMonth =
| `${1 | 2}${Digit}`
| `0${Exclude<Digit, 0>}`
| `3${0 | 1}`;
`${1 | 2}${Digit}` | `0${Exclude<Digit, 0>}` | `3${0 | 1}`;
3 changes: 1 addition & 2 deletions @coven/types/NormalizeEntryKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@
* @template EntryKey `PropertyKey` to be stringified.
*/
export type NormalizeEntryKey<EntryKey extends PropertyKey> =
| Exclude<EntryKey, number>
| `${Extract<EntryKey, number>}`;
Exclude<EntryKey, number> | `${Extract<EntryKey, number>}`;
6 changes: 3 additions & 3 deletions @simulcast/core/BroadcastObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ export type BroadcastObject<Events extends EventTypeDictionary> = Readonly<
/**
* Dynamically generated `emit`.
*/
[Event in keyof Events as `emit${Capitalize<keyof Events & string>}`]: EventHandler<
Events[Event]
>;
[
Event in keyof Events as `emit${Capitalize<keyof Events & string>}`
]: EventHandler<Events[Event]>;
} & {
/**
* Dynamically generated `on`.
Expand Down
3 changes: 3 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"noUnusedParameters": true,
"strict": true
},
"coverage": {
"thresholds": { "branches": 100, "functions": 100, "lines": 100 }
},

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the relevant change, all other were introduced automatically by Prettier.

"exclude": ["coverage"],
"fmt": {
"bracePosition": "sameLine",
Expand Down