Start consolidating shared types in the monorepo (#34062)

* Start consolidating shared types in the monorepo

* Iterate

* Simplify api-extractor

* Iterate

* Fix lockfile
This commit is contained in:
Michael Telatynski
2026-07-06 13:49:32 +00:00
committed by GitHub
parent b6cbc3a9d8
commit d4f72dfa69
29 changed files with 519 additions and 389 deletions
+1 -1
View File
@@ -67,7 +67,7 @@
*
* "bundledPackages": [ "@my-company/*" ],
*/
"bundledPackages": [],
"bundledPackages": ["shared-types"],
/**
* Specifies what type of newlines API Extractor should use when writing output files. By default, the output files
@@ -125,8 +125,10 @@ export type ComposerApiTarget = {
view: "thread";
};
// Warning: (ae-forgotten-export) The symbol "WebConfigJson" needs to be exported by the entry point index.d.ts
//
// @public
export interface Config {
export interface Config extends WebConfigJson {
// (undocumented)
brand: string;
}
+1
View File
@@ -46,6 +46,7 @@
"matrix-widget-api": "^1.17.0",
"rollup-plugin-external-globals": "^0.13.0",
"semver": "^7.6.3",
"shared-types": "workspace:*",
"typescript": "catalog:",
"unplugin-dts": "catalog:",
"vite": "catalog:",
+2 -6
View File
@@ -5,14 +5,10 @@
"targets": {
"build": {
"cache": true,
"executor": "nx:run-commands",
"inputs": ["src"],
"outputs": ["{projectRoot}/lib"],
"options": {
"commands": ["vite build", "api-extractor run"],
"parallel": false,
"cwd": "packages/module-api"
}
"command": "vite build",
"options": { "cwd": "packages/module-api" }
},
"start": {
"command": "vite build --watch",
+3 -3
View File
@@ -5,16 +5,16 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details.
*/
import { type WebConfigJson } from "shared-types";
/**
* The configuration for the application.
* Should be extended via declaration merging.
* @public
*/
export interface Config {
export interface Config extends WebConfigJson {
// The branding name of the application
brand: string;
// Other config options are available but not specified in the types as that would make it difficult to change for element-web
// they are accessible at runtime all the same, see list at https://github.com/element-hq/element-web/blob/develop/docs/config.md
}
/**
+5 -1
View File
@@ -27,7 +27,11 @@ export default defineConfig({
sourcemap: true,
},
plugins: [
dts(),
dts({
bundleTypes: {
configPath: "./api-extractor.json",
},
}),
externalGlobals({
// Reuse React from the host app
react: "window.React",