chore: upgrade TypeScript to 6.0.3 and modernize tsconfig
- typescript 5.9.3 to 6.0.3 - moduleResolution Node to bundler (correct for Vite projects) - target/lib ES2016 to ES2020 (enables flatMap, Promise.allSettled) - Fix global to globalThis in initMatrix.ts (browser env) - Fix EventEmitter default to named import in CallControl.ts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { ClientWidgetApi } from 'matrix-widget-api';
|
||||
import EventEmitter from 'events';
|
||||
import { EventEmitter } from 'events';
|
||||
import { CallControlState } from './CallControlState';
|
||||
import { ElementMediaStateDetail, ElementMediaStatePayload, ElementWidgetActions } from './types';
|
||||
|
||||
|
||||
@@ -17,12 +17,12 @@ export const IDB_VERSION_CONFLICT = 'IDB_VERSION_CONFLICT';
|
||||
|
||||
export const initClient = async (session: Session): Promise<MatrixClient> => {
|
||||
const indexedDBStore = new IndexedDBStore({
|
||||
indexedDB: global.indexedDB,
|
||||
localStorage: global.localStorage,
|
||||
indexedDB: globalThis.indexedDB,
|
||||
localStorage: globalThis.localStorage,
|
||||
dbName: 'web-sync-store',
|
||||
});
|
||||
|
||||
const legacyCryptoStore = new IndexedDBCryptoStore(global.indexedDB, 'crypto-store');
|
||||
const legacyCryptoStore = new IndexedDBCryptoStore(globalThis.indexedDB, 'crypto-store');
|
||||
|
||||
const mx = createClient({
|
||||
baseUrl: session.baseUrl,
|
||||
|
||||
Reference in New Issue
Block a user