electron/spec-main
Samuel Attard 81795744cf
fix: ensure the typescript definitions only export correct value types (#28712)
* fix: ensure the typescript definitions only export correct value types

In typescript there are two main types of "types" you can export, value types (class, const) and definition types (type, interface).  The typescript compiler will let anything declared via const or class be used as a value.  Unfortunately we were exporting a bunch of things (see the diff) as class/const when they weren't actually exported values. This lead to typescript being happy but the runtime throwing errors (not something we want).

This change passes "exported-in" context through our docs, to the parser and then to the definitions generator to ensure we only mark things as exported in the ts defs that we actually export.

Fixes #22167

* chore: update typescript-defs

* chore: update typescript-defs

* chore: fix bad typescript in IPC test

* docs: test rendering of new syntax

* chore: update per feedback, use same syntax but with 'this is not exportedd' line
2021-06-15 13:50:31 -07:00
..
fixtures fix: improper wrapping of fs.promises.readFile (#29528) 2021-06-07 21:19:39 +02:00
.eslintrc
.gitignore spec: add tests for the autoUpdater on macOS that actually test if it works (#17442) 2019-03-29 17:32:52 -07:00
ambient.d.ts chore: tsify menu (#24358) 2020-07-06 13:24:54 -07:00
api-app-spec.ts feat: add new runningUnderARM64Translation property to detect x64 translated apps running on Windows ARM (#29168) 2021-06-02 16:16:33 +09:00
api-auto-updater-spec.ts ci: enable arm64 macOS tests (#24832) 2021-01-21 18:36:52 -05:00
api-autoupdater-darwin-spec.ts chore: update to latest TypeScript, which has built-in WeakRef declarations (#27425) 2021-01-22 11:25:47 -08:00
api-browser-view-spec.ts feat: add win.setTopBrowserView() so that BrowserViews can be raised (#27007) 2021-02-10 16:23:35 +09:00
api-browser-window-spec.ts test: re-enable some skipped tests (#29655) 2021-06-15 10:55:08 +09:00
api-content-tracing-spec.ts ci: enable arm64 macOS tests (#24832) 2021-01-21 18:36:52 -05:00
api-context-bridge-spec.ts feat: add support for Blob's going over the ctx bridge (#29247) 2021-05-26 10:34:29 -07:00
api-crash-reporter-spec.ts feat: allow omitting submitURL when uploadToServer is false (#28105) 2021-03-18 14:15:19 -07:00
api-debugger-spec.ts feat: expose sessionId in debugger module (#24170) 2020-07-02 13:04:20 -07:00
api-deprecate-spec.ts refactor: replace a few any-s with proper types (#25681) 2020-10-08 03:01:23 +02:00
api-desktop-capturer-spec.ts feat: enable context isolation by default (#26890) 2021-03-01 16:52:29 -05:00
api-dialog-spec.ts feat: expose electron/{process} typed modules (#22937) 2020-04-06 17:04:09 -07:00
api-global-shortcut-spec.ts fix: volume key globalShortcut registration (#23782) 2020-05-28 08:56:48 -04:00
api-in-app-purchase-spec.ts feat: expose electron/{process} typed modules (#22937) 2020-04-06 17:04:09 -07:00
api-ipc-main-spec.ts feat: enable context isolation by default (#26890) 2021-03-01 16:52:29 -05:00
api-ipc-renderer-spec.ts feat: enable context isolation by default (#26890) 2021-03-01 16:52:29 -05:00
api-ipc-spec.ts fix: ensure the typescript definitions only export correct value types (#28712) 2021-06-15 13:50:31 -07:00
api-menu-item-spec.ts fix: keep shifted character in menu accelerator (#29202) 2021-06-02 16:32:48 +09:00
api-menu-spec.ts chore: update to latest TypeScript, which has built-in WeakRef declarations (#27425) 2021-01-22 11:25:47 -08:00
api-native-theme-spec.ts spec: attempt to fix flaky nativeTheme spec (#29022) 2021-05-05 18:04:38 -07:00
api-net-log-spec.ts chore: update to latest TypeScript, which has built-in WeakRef declarations (#27425) 2021-01-22 11:25:47 -08:00
api-net-spec.ts ci: enable arm64 macOS tests (#24832) 2021-01-21 18:36:52 -05:00
api-notification-dbus-spec.ts feat: expose electron/{process} typed modules (#22937) 2020-04-06 17:04:09 -07:00
api-notification-spec.ts feat: custom toast xml and failure reporting for notifications (#25401) 2020-09-29 12:20:10 -07:00
api-power-monitor-spec.ts feat: add powerMonitor.onBatteryPower (#26494) 2020-11-16 16:31:46 -08:00
api-power-save-blocker-spec.ts feat: expose electron/{process} typed modules (#22937) 2020-04-06 17:04:09 -07:00
api-protocol-spec.ts test: re-enable some skipped tests (#29655) 2021-06-15 10:55:08 +09:00
api-screen-spec.ts fix: add a "set" trap to the "screen" module proxy (#26818) 2020-12-07 09:20:50 -08:00
api-service-workers-spec.ts test: use new uuid for each ServiceWorker test (#27444) 2021-01-23 10:37:51 +09:00
api-session-spec.ts feat: add session.storagePath to get path on disk for session data (#28665) 2021-04-27 09:54:28 -07:00
api-shell-spec.ts test: disable shell.trashItem in renderer test on win-ia32 (#28868) 2021-04-27 14:35:31 -07:00
api-subframe-spec.ts feat: enable context isolation by default (#26890) 2021-03-01 16:52:29 -05:00
api-system-preferences-spec.ts chore: remove deprecated systemPreferences methods (#26849) 2020-12-16 08:34:24 +09:00
api-touch-bar-spec.ts feat: expose electron/{process} typed modules (#22937) 2020-04-06 17:04:09 -07:00
api-tray-spec.ts refactor: remove path from nativeImage converter (#26546) 2021-01-04 12:58:31 -08:00
api-view-spec.ts refactor: rename TopLevelWindow to BaseWindow (#24305) 2020-06-29 16:06:20 +09:00
api-web-contents-spec.ts chore: bump chromium to 93.0.4530.0 (master) (#29256) 2021-06-03 01:05:04 -07:00
api-web-contents-view-spec.ts test: disable some tests under ASan which might receive SIGKILL because of OOM (#28156) 2021-03-16 17:02:47 -04:00
api-web-frame-main-spec.ts feat: add WebFrameMain.visibilityState (#28706) 2021-04-22 12:00:58 -04:00
api-web-frame-spec.ts chore: remove deprecated worldSafeExecuteJavaScript option (#28456) 2021-04-08 12:03:57 -04:00
api-web-request-spec.ts fix: use correct spelling of attachment with Content-Disposition header (#29621) 2021-06-14 11:05:16 +09:00
asar-spec.ts test: worker should be able to load asar files (#28858) 2021-04-27 12:07:05 -04:00
autofill-spec.ts test: add test for datalist autofills (#23110) 2020-04-21 12:28:31 -07:00
chromium-spec.ts fix: Revert "fix: don't propagate GDK_BACKEND to subprocs (#28898)" (#29610) 2021-06-09 08:28:52 -07:00
crash-spec.ts build: give ASAN tests more memory to avoid SIGKILL or disabling tests (#28567) 2021-04-09 16:09:17 +09:00
events-helpers.ts chore: deprecate remote (#25293) 2020-09-10 09:17:17 -07:00
extensions-spec.ts refactor: be more precise when creating api::WebContents (#23128) 2021-04-23 13:51:37 -07:00
guest-window-manager-spec.ts feat: add more info in setWindowOpenHandler details (#28518) 2021-04-13 15:35:27 -04:00
index.js fix: make sure service worker scheme is registered with allowServiceWorkers (#28326) 2021-03-23 11:16:53 -04:00
internal-spec.ts feat: remove deprecated additionalFeatures (#28548) 2021-04-19 15:46:54 -07:00
modules-spec.ts feat: enable context isolation by default (#26890) 2021-03-01 16:52:29 -05:00
node-spec.ts fix: improper wrapping of fs.promises.readFile (#29528) 2021-06-07 21:19:39 +02:00
package.json fix: export libuv symbols (#24659) 2020-08-11 19:17:18 +09:00
pipe-transport.ts chore: support --remote-debugging-pipe (#23433) 2020-05-07 21:27:55 -07:00
release-notes-spec.ts chore: graceful handling of notes with sub-lists (#25279) 2020-09-03 14:42:48 -05:00
security-warnings-spec.ts chore: remove deprecated remote module (#25734) 2021-03-09 17:12:40 -08:00
spec-helpers.ts feat: add WebFrameMain.visibilityState (#28706) 2021-04-22 12:00:58 -04:00
spellchecker-spec.ts fix: webFrame spell checker APIs crashing in sandboxed renderers (#29053) 2021-05-10 14:19:23 +02:00
types-spec.ts build: enable JS semicolons (#22783) 2020-03-20 13:28:31 -07:00
version-bump-spec.ts build: update support.md on stable version bumps (#29381) 2021-06-02 12:53:23 -07:00
video-helpers.js chore: fix minor script warnings (#25575) 2020-09-23 13:21:34 -07:00
visibility-state-spec.ts feat: enable context isolation by default (#26890) 2021-03-01 16:52:29 -05:00
webview-spec.ts fix: <webview> focus / blur events don't work with contextIsolation enabled (#29004) 2021-05-05 11:31:44 -07:00
window-helpers.ts feat: expose electron/{process} typed modules (#22937) 2020-04-06 17:04:09 -07:00
yarn.lock fix: export libuv symbols (#24659) 2020-08-11 19:17:18 +09:00