12 Commits
Author SHA1 Message Date
Samuel AttardandClaude 8a6429e414 build: upgrade to TypeScript 7 (#54172)
TypeScript 7.0 is the native compiler and ships no JavaScript API. The
earlier changes in this series already moved everything that transpiled
on the fly (script/ and spec/) onto Node's own type stripping, so what
is left here is the compiler swap itself:

* typescript ^5.8.3 -> ^7.0.2.
* build/bundle/typecheck.mjs spawns tsc instead of driving the compiler
  API (the rootDir/private-field diagnostics it used to filter out are
  handled by tsconfig.electron.json setting rootDir to the parent
  checkout instead).
* tsconfig.json drops the removed baseUrl option and anchors the paths
  mapping explicitly; tsconfig.default_app.json moves off the removed
  "node" module resolution; `declare module NodeJS` becomes a namespace.
* A few lib/, spec and docs snippets wrap Buffers for the stricter
  Buffer/ArrayBuffer typings that Blob now expects.

Co-authored-by: Claude <noreply@anthropic.com>
2026-09-21 15:21:32 -07:00
David Sanders a201d6c541 build: drop @types/webpack-env in favor of webpack/module types (#47798)
* build: drop @types/webpack-env in favor of webpack/module types

* chore: improve type when assigning to global.require
2025-08-08 18:09:23 -07:00
Samuel Attard 74af96da16 build: update some build dependencies (#43882)
* build: update some build dependencies

* build: fix eslint issues after updating

* build: disable ts check on busted js example

* build: update internal types for stricter event handling

* restore url.parse behavior

* fix typing issues

* sigh

* build: update easy deps

* build: skip woa engines check
2024-09-26 00:12:11 -07:00
Samuel Attard 44e055a788 build: specify explicit typeroots for ts builds (#40588)
Upstreaming of https://github.com/discord/electron/commit/bf63336f6065e6654f4c315cab2b3c7921145173
2023-11-22 09:39:36 -08:00
Milan Burda 607e71d563 refactor: replace Object.prototype.hasOwnProperty() with Object.hasOwn() (#38929) 2023-06-27 16:57:33 -04:00
Milan Burda 70190ec2b1 chore: update to latest TypeScript, which has built-in WeakRef declarations (#27425) 2021-01-22 11:25:47 -08:00
Samuel Attard 3f54f240bd perf: pass primitives directly through the context bridge, avoids copying (#24531) 2020-07-14 18:38:54 -07:00
Milan Burda c79613b037 chore: convert more files to TypeScript (#18820) 2019-07-17 10:23:52 -07:00
Felix Rieseberg 5581990d78 build: Update TypeScript, use @typescript-eslint (#17251)
* build: Update TypeScript to v3.3

* build: Update TypeScript, use @typescript-eslint
2019-03-07 12:56:02 -08:00
Felix Rieseberg 6cd75744ef refactor: Port window-setup to TS (#16894)
* refactor: Port window-setup to TS

* refactor: Make the linter happy

* refactor: Sneaky little TS error

* refactor: Correctly import window-setup

* refactor: Implement feedback <3

* refactor: Allow decorators in TS

* refactor: Use named windowSetup in isolatedRenderer

* refactor: Help TS understand

* refactor: Welp, use createEvent again

* refactor: Use the correct target in the decorator
2019-02-14 03:52:38 -10:00
Samuel Attard 01c442de64 refactor: convert more files to typescript (#16820) 2019-02-12 04:22:33 -10:00
Samuel Attard 26df9992cf build: use typescript for internal Electron JS code (#16441) 2019-02-06 10:27:20 -08:00