Skip to content

Commit

Permalink
Require TS 5.7 and update target to ES2024 (#12)
Browse files Browse the repository at this point in the history
* Require TS 5.7 and update target to ES2024

* Add fixtures
  • Loading branch information
billyjanitsch authored Nov 27, 2024
1 parent cc4f7c8 commit 0c27d42
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 8 deletions.
6 changes: 6 additions & 0 deletions fixtures/dom-iterable.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const formData = new FormData()
formData.set('name', 'Aliza')

for (const [key, value] of formData) {
console.log(key, value)
}
14 changes: 14 additions & 0 deletions fixtures/es2024.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
interface Item {
name: string
type: 'fruit' | 'vegetable'
}

const produce: Item[] = [
{name: 'apple', type: 'fruit'},
{name: 'banana', type: 'fruit'},
{name: 'carrot', type: 'vegetable'},
]

const result = Map.groupBy(produce, (item) => item.type)

console.log(result.get('fruit'))
10 changes: 5 additions & 5 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
"license": "Apache-2.0",
"prettier": "@kensho-technologies/prettier-config",
"peerDependencies": {
"typescript": "^5.0.0"
"typescript": "^5.7.0"
},
"devDependencies": {
"@kensho-technologies/prettier-config": "^3.0.0",
"@types/react": "^18.3.12",
"prettier": "^3.3.3",
"prettier": "^3.4.1",
"react": "^18.3.1"
}
}
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
"incremental": true,
"isolatedModules": true,
"jsx": "react-jsx",
"lib": ["ES2024", "DOM", "DOM.Iterable"],
"module": "ES2022",
"moduleResolution": "bundler",
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"strict": true,
"target": "ES2022",
"target": "ES2024",
"tsBuildInfoFile": ".tsbuildinfo"
}
}

0 comments on commit 0c27d42

Please sign in to comment.