Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bb69bbb

Browse filesBrowse files
committed
fix import type
1 parent 5c0ae3b commit bb69bbb
Copy full SHA for bb69bbb

File tree

Expand file treeCollapse file tree

24 files changed

+29
-24
lines changed
Filter options
Expand file treeCollapse file tree

24 files changed

+29
-24
lines changed

‎2023/01/index.ts

Copy file name to clipboardExpand all lines: 2023/01/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Expect, Equal } from "type-testing";
1+
import type { Expect, Equal } from "type-testing";
22

33
type SantasFavoriteCookies = "ginger-bread" | "chocolate-chip";
44

‎2023/02/index.ts

Copy file name to clipboardExpand all lines: 2023/02/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Expect, Equal } from "type-testing";
1+
import type { Expect, Equal } from "type-testing";
22

33
const cookieInventory = {
44
chocolate: 1,

‎2023/03/index.ts

Copy file name to clipboardExpand all lines: 2023/03/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Expect, Equal } from "type-testing";
1+
import type { Expect, Equal } from "type-testing";
22

33
interface GiftWrapper<Gift1, Gift2, Gitf3> {
44
present: Gift1;

‎2023/04/index.ts

Copy file name to clipboardExpand all lines: 2023/04/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Expect, Equal } from "type-testing";
1+
import type { Expect, Equal } from "type-testing";
22

33
interface Address {
44
address: string;

‎2023/05/index.ts

Copy file name to clipboardExpand all lines: 2023/05/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Expect, Equal } from "type-testing";
1+
import type { Expect, Equal } from "type-testing";
22

33
type SantasList<
44
Bads extends readonly unknown[],

‎2023/06/index.ts

Copy file name to clipboardExpand all lines: 2023/06/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Expect, Equal } from "type-testing";
1+
import type { Expect, Equal } from "type-testing";
22

33
type FilterChildrenBy<T, Filter> = T extends Filter ? never : T;
44

‎2023/07/index.ts

Copy file name to clipboardExpand all lines: 2023/07/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Expect, Equal } from "type-testing";
1+
import type { Expect, Equal } from "type-testing";
22

33
type AppendGood<T> = {
44
[K in keyof T as `good_${string & K}`]: T[K];

‎2023/08/index.ts

Copy file name to clipboardExpand all lines: 2023/08/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Expect, Equal } from "type-testing";
1+
import type { Expect, Equal } from "type-testing";
22

33
type RemoveNaughtyChildren<T> = Omit<T, `naughty${string}`>;
44

‎2023/09/index.ts

Copy file name to clipboardExpand all lines: 2023/09/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Expect, Equal } from "type-testing";
1+
import type { Expect, Equal } from "type-testing";
22

33
type Reverse<T> = T extends `${infer First}${infer Rest}`
44
? `${Reverse<Rest>}${First}`

‎2023/10/index.ts

Copy file name to clipboardExpand all lines: 2023/10/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Expect, Equal } from "type-testing";
1+
import type { Expect, Equal } from "type-testing";
22

33
type StreetSuffixTester<
44
Words,

‎2023/11/index.ts

Copy file name to clipboardExpand all lines: 2023/11/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Expect, Equal } from "type-testing";
1+
import type { Expect, Equal } from "type-testing";
22

33
type DeepReadonly<T> = {
44
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type

‎2023/12/index.ts

Copy file name to clipboardExpand all lines: 2023/12/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Expect, Equal } from "type-testing";
1+
import type { Expect, Equal } from "type-testing";
22

33
// recursion
44
// type FindSanta<T> = T extends [...infer Rest, infer Last]

‎2023/13/index.ts

Copy file name to clipboardExpand all lines: 2023/13/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Expect, Equal } from "type-testing";
1+
import type { Expect, Equal } from "type-testing";
22

33
// Only work if day start at 1
44
// type DayCounter<

‎2023/14/index.ts

Copy file name to clipboardExpand all lines: 2023/14/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Expect, Equal } from "type-testing";
1+
import type { Expect, Equal } from "type-testing";
22

33
type DecipherNaughtyList<Words> = Words extends `${infer Start}/${infer Rest}`
44
? Start | DecipherNaughtyList<Rest>

‎2023/15/index.ts

Copy file name to clipboardExpand all lines: 2023/15/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Expect, Equal } from "type-testing";
1+
import type { Expect, Equal } from "type-testing";
22

33
// It used Distributive Conditional Types
44
// https://www.typescriptlang.org/docs/handbook/2/conditional-types.html#distributive-conditional-types

‎2023/16/index.ts

Copy file name to clipboardExpand all lines: 2023/16/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Expect, Equal } from "type-testing";
1+
import type { Expect, Equal } from "type-testing";
22

33
type StringToNumber<T> = T extends `${infer N extends number}` ? N : never;
44

‎2023/17/index.ts

Copy file name to clipboardExpand all lines: 2023/17/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Expect, Equal } from "type-testing";
1+
import type { Expect, Equal } from "type-testing";
22

33
type RockPaperScissors = "👊🏻" | "🖐🏾" | "✌🏽";
44
type RockPaperScissorsWin = ["👊🏻", "🖐🏾"] | ["🖐🏾", "✌🏽"] | ["✌🏽", "👊🏻"];

‎2023/18/index.ts

Copy file name to clipboardExpand all lines: 2023/18/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Expect, Equal } from "type-testing";
1+
import type { Expect, Equal } from "type-testing";
22

33
type Count<
44
Toys extends string[],

‎2023/19/index.ts

Copy file name to clipboardExpand all lines: 2023/19/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Expect, Equal } from "type-testing";
1+
import type { Expect, Equal } from "type-testing";
22

33
type Toy = ["🛹", "🚲", "🛴", "🏄"];
44

‎2023/20/index.ts

Copy file name to clipboardExpand all lines: 2023/20/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Expect, Equal } from "type-testing";
1+
import type { Expect, Equal } from "type-testing";
22

33
interface Letters {
44
A: ["█▀█ ", "█▀█ ", "▀ ▀ "];

‎2023/21/index.ts

Copy file name to clipboardExpand all lines: 2023/21/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Equal, Expect } from "type-testing";
1+
import type { Equal, Expect } from "type-testing";
22

33
type TicTacToeChip = "❌" | "⭕";
44
type TicTacToeEndState = `${TicTacToeChip} Won` | "Draw";

‎2024/01/index.ts

Copy file name to clipboardExpand all lines: 2024/01/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Expect, Equal } from "type-testing";
1+
import type { Expect, Equal } from "type-testing";
22

33
type Demand = number;
44

‎2024/02/index.ts

Copy file name to clipboardExpand all lines: 2024/02/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Expect, Equal } from "type-testing";
1+
import type { Expect, Equal } from "type-testing";
22

33
type Demand = 900_000;
44

‎eslint.config.mjs

Copy file name to clipboardExpand all lines: eslint.config.mjs
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ export default tseslint.config(
1111
{
1212
files: ["**/*.ts"],
1313
rules: {
14+
"@typescript-eslint/no-import-type-side-effects": "error",
15+
"@typescript-eslint/consistent-type-imports": [
16+
"error",
17+
{ prefer: "type-imports", fixStyle: "separate-type-imports" },
18+
],
1419
"@typescript-eslint/no-unused-vars": [
1520
"error",
1621
{
@@ -24,5 +29,5 @@ export default tseslint.config(
2429
},
2530
],
2631
},
27-
},
32+
}
2833
);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.