Skip to content

Commit

Permalink
feat: update to eslint v9
Browse files Browse the repository at this point in the history
  • Loading branch information
jdpnielsen committed Jun 21, 2024
1 parent 4e8b6c9 commit 9dbe993
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions fixtures/output/ts-override/typescript.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Define a TypeScript interface
export type Person = {
name: string; age: number;
name: string;
age: number;
};

// Create an array of objects with the defined interface
const people: Person[] = [
{ name: 'Alice', age: 30 },
{ name: 'Bob', age: 25 },
{ name: 'Charlie',
age: 35 },
{ name: 'Charlie', age: 35 },
];

// eslint-disable-next-line no-console
Expand All @@ -26,7 +26,8 @@ function identity< T >(arg: T): T {

// Use the generic function with type inference
const result = identity(
'TypeScript is awesome');
'TypeScript is awesome',
);
log(result);

// Use optional properties in an interface
Expand All @@ -38,7 +39,9 @@ type Car = {
// Create objects using the interface
const car1: Car = { make: 'Toyota' };
const car2: Car = {
make: 'Ford', model: 'Focus' };
make: 'Ford',
model: 'Focus',
};

// Use union types
type Fruit = 'apple' | 'banana' | 'orange';
Expand Down

0 comments on commit 9dbe993

Please sign in to comment.