Skip to content

Commit

Permalink
Added format script and formatted code
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpocock committed May 27, 2024
1 parent 8568d22 commit 3ba412d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 14 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"lint": "tsc",
"lint-pkg-json": "tsx scripts/lint.ts",
"release": "turbo run publish",
"publish": "changeset publish"
"publish": "changeset publish",
"format": "prettier --write \"./src/**/**.ts\" --write"
},
"main": "./dist/recommended.js",
"module": "./dist/recommended.mjs",
Expand Down Expand Up @@ -98,6 +99,7 @@
"@changesets/cli": "^2.27.3",
"@types/node": "^18.19.33",
"check-export-map": "^1.3.1",
"prettier": "^3.2.5",
"tsx": "^3.14.0",
"turbo": "^1.13.3",
"typescript": "^5.4.5"
Expand Down
10 changes: 10 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions src/entrypoints/utils.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ declare namespace TSReset {
type WidenLiteral<T> = T extends string
? string
: T extends number
? number
: T extends boolean
? boolean
: T extends bigint
? bigint
: T extends symbol
? symbol
: T;
? number
: T extends boolean
? boolean
: T extends bigint
? bigint
: T extends symbol
? symbol
: T;
}
9 changes: 4 additions & 5 deletions src/tests/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ export type ExpectFalse<T extends false> = T;
export type IsTrue<T extends true> = T;
export type IsFalse<T extends false> = T;

export type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends <
T,
>() => T extends Y ? 1 : 2
? true
: false;
export type Equal<X, Y> =
(<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2
? true
: false;
export type NotEqual<X, Y> = true extends Equal<X, Y> ? false : true;

// https://stackoverflow.com/questions/49927523/disallow-call-with-any/49928360#49928360
Expand Down

0 comments on commit 3ba412d

Please sign in to comment.