Skip to content

Commit c8aecc6

Browse files
committed
chore: migrate typescript compiltation to typescript/native-preview
1 parent 46a7dda commit c8aecc6

22 files changed

Lines changed: 206 additions & 89 deletions

examples/todo-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"type": "module",
77
"private": true,
88
"scripts": {
9-
"build": "tsc -p tsconfig.json && vite build",
9+
"build": "tsgo -p tsconfig.json && vite build",
1010
"start": "vite",
1111
"test": "npm run build"
1212
},

package-lock.json

Lines changed: 118 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"test:validation": "npm run test:diff",
4141
"test": "lage test:node test:playwright",
4242
"test:chromium": "lage test:node test:chromium",
43-
"watch": "tsc -p ./tsconfig.json -w --preserveWatchOutput",
43+
"watch": "tsgo -p ./tsconfig.json -w --preserveWatchOutput",
4444
"format:check": "biome format --changed --no-errors-on-unmatched .",
4545
"format": "biome format --changed --no-errors-on-unmatched --fix --write .",
4646
"lint": "biome-changed",
@@ -57,6 +57,7 @@
5757
"@rollup/plugin-node-resolve": "16.0.3",
5858
"@rollup/plugin-terser": "1.0.0",
5959
"@rollup/plugin-typescript": "12.3.0",
60+
"@typescript/native-preview": "7.0.0-dev.20260421.2",
6061
"@types/express": "^5.0.6",
6162
"beachball": "2.63.0",
6263
"concurrently": "9.2.1",

packages/fast-element/SIZES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Bundle sizes for `@microsoft/fast-element` exports.
55
| Export | Minified | Gzip | Brotli |
66
|--------|----------|------|--------|
77
| CDN Rollup Bundle | 67.59 KB | 20.00 KB | 17.93 KB |
8-
| FASTElement | 28.10 KB | 8.75 KB | 7.87 KB |
8+
| FASTElement | 28.10 KB | 8.72 KB | 7.86 KB |
99
| Updates | 3.61 KB | 1.48 KB | 1.26 KB |
1010
| Observable | 8.12 KB | 2.99 KB | 2.66 KB |
1111
| observable | 8.16 KB | 3.00 KB | 2.68 KB |

packages/fast-element/docs/api-report.api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ export interface ExecutionContext<TParent = any> {
387387

388388
// @public
389389
export const ExecutionContext: Readonly<{
390-
default: ExecutionContext<any>;
390+
default: ExecutionContext;
391391
getEvent(): Event | null;
392392
setEvent(event: Event | null): void;
393393
}>;
@@ -729,8 +729,8 @@ export const Observable: Readonly<{
729729
notify(source: unknown, args: any): void;
730730
defineProperty(target: {}, nameOrAccessor: string | Accessor): void;
731731
getAccessors: (target: {}) => Accessor[];
732-
binding<TSource = any, TReturn = any>(expression: Expression<TSource, TReturn, any>, initialSubscriber?: Subscriber, isVolatileBinding?: boolean): ExpressionNotifier<TSource, TReturn, any>;
733-
isVolatileBinding<TSource_1 = any, TReturn_1 = any>(expression: Expression<TSource_1, TReturn_1, any>): boolean;
732+
binding<TSource = any, TReturn = any>(expression: Expression<TSource, TReturn>, initialSubscriber?: Subscriber, isVolatileBinding?: boolean): ExpressionNotifier<TSource, TReturn>;
733+
isVolatileBinding<TSource = any, TReturn = any>(expression: Expression<TSource, TReturn>): boolean;
734734
}>;
735735

736736
// @public

packages/fast-element/docs/context/api-report.api.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ export type Context<T> = {
1414
export const Context: Readonly<{
1515
eventType: "context-request";
1616
for<T = unknown>(name: string): FASTContext<T>;
17-
create<T_1 = unknown>(name: string, initialValue?: T_1 | undefined): FASTContext<T_1>;
17+
create<T = unknown>(name: string, initialValue?: T): FASTContext<T>;
1818
setDefaultRequestStrategy(strategy: FASTContextRequestStrategy): void;
19-
get<T_2 extends UnknownContext>(target: EventTarget, context: T_2): ContextType<T_2>;
20-
request<T_3 extends UnknownContext>(target: EventTarget, context: T_3, callback: ContextCallback<ContextType<T_3>>, multiple?: boolean): void;
21-
dispatch<T_4 extends UnknownContext>(target: EventTarget, context: T_4, callback: ContextCallback<ContextType<T_4>>, multiple?: boolean): void;
22-
provide<T_5 extends UnknownContext>(target: EventTarget, context: T_5, value: ContextType<T_5>): void;
23-
handle<T_6 extends UnknownContext>(target: EventTarget, callback: (event: ContextEvent<T_6>) => void, context?: T_6 | undefined): void;
24-
defineProperty<T_7 extends UnknownContext>(target: Constructable<EventTarget> | EventTarget, propertyName: string, context: T_7): void;
19+
get<T extends UnknownContext>(target: EventTarget, context: T): ContextType<T>;
20+
request<T extends UnknownContext>(target: EventTarget, context: T, callback: ContextCallback<ContextType<T>>, multiple?: boolean): void;
21+
dispatch<T extends UnknownContext>(target: EventTarget, context: T, callback: ContextCallback<ContextType<T>>, multiple?: boolean): void;
22+
provide<T extends UnknownContext>(target: EventTarget, context: T, value: ContextType<T>): void;
23+
handle<T extends UnknownContext>(target: EventTarget, callback: (event: ContextEvent<T>) => void, context?: T): void;
24+
defineProperty<T extends UnknownContext>(target: Constructable<EventTarget> | EventTarget, propertyName: string, context: T): void;
2525
}>;
2626

2727
// @public

packages/fast-element/docs/di/api-report.api.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export const DI: Readonly<{
100100
createContext: typeof createContext;
101101
inject(...dependencies: Key[]): (target: any, key?: string | number, descriptor?: PropertyDescriptor | number) => void;
102102
transient<T extends Constructable>(target: T & Partial<RegisterSelf<T>>): T & RegisterSelf<T>;
103-
singleton<T_1 extends Constructable>(target: T_1 & Partial<RegisterSelf<T_1>>, options?: SingletonOptions): T_1 & RegisterSelf<T_1>;
103+
singleton<T extends Constructable>(target: T & Partial<RegisterSelf<T>>, options?: SingletonOptions): T & RegisterSelf<T>;
104104
}>;
105105

106106
// @public
@@ -184,11 +184,11 @@ export interface Registration<K = any> {
184184
// @public
185185
export const Registration: Readonly<{
186186
instance<T>(key: Key, value: T): Registration<T>;
187-
singleton<T_1 extends Constructable>(key: Key, value: T_1): Registration<InstanceType<T_1>>;
188-
transient<T_2 extends Constructable>(key: Key, value: T_2): Registration<InstanceType<T_2>>;
189-
callback<T_3>(key: Key, callback: ResolveCallback<T_3>): Registration<Resolved<T_3>>;
190-
cachedCallback<T_4>(key: Key, callback: ResolveCallback<T_4>): Registration<Resolved<T_4>>;
191-
aliasTo<T_5>(originalKey: T_5, aliasKey: Key): Registration<Resolved<T_5>>;
187+
singleton<T extends Constructable>(key: Key, value: T): Registration<InstanceType<T>>;
188+
transient<T extends Constructable>(key: Key, value: T): Registration<InstanceType<T>>;
189+
callback<T>(key: Key, callback: ResolveCallback<T>): Registration<Resolved<T>>;
190+
cachedCallback<T>(key: Key, callback: ResolveCallback<T>): Registration<Resolved<T>>;
191+
aliasTo<T>(originalKey: T, aliasKey: Key): Registration<Resolved<T>>;
192192
}>;
193193

194194
// @public

packages/fast-element/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@
109109
"build": "npm run build:tsc && npm run build:rollup && npm run build:sizes && npm run doc && npm run doc:exports",
110110
"build:rollup": "rollup -c",
111111
"build:sizes": "node scripts/measure-sizes.js",
112-
"build:tsc": "tsc -p ./tsconfig.json",
113-
"dev": "tsc -p ./tsconfig.json -w",
112+
"build:tsc": "tsgo -p ./tsconfig.json",
113+
"dev": "tsgo -p ./tsconfig.json -w",
114114
"prepublishOnly": "npm run clean && npm run build",
115115
"lint": "biome-changed",
116116
"lint:fix": "biome-changed -- --fix",
Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
{
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
4+
"rootDir": "./src",
45
"declarationDir": "dist/dts",
56
"outDir": "dist/esm",
67
"verbatimModuleSyntax": true,
78
"experimentalDecorators": true,
89
"emitDecoratorMetadata": true,
10+
"strict": false,
911
"noImplicitAny": false,
12+
"noImplicitThis": false,
13+
"strictBindCallApply": false,
14+
"strictFunctionTypes": false,
1015
"strictPropertyInitialization": false,
1116
"target": "es2015",
1217
"module": "ESNext",
1318
"moduleResolution": "bundler",
14-
"lib": [
15-
"DOM",
16-
"ES2015",
17-
"ES2016.Array.Include"
18-
]
19+
"lib": ["DOM", "ES2015", "ES2016.Array.Include"]
1920
},
20-
"include": [ "src" ],
21-
"exclude": [
22-
"src/**/*.pw.spec.ts"
23-
]
21+
"include": ["src"],
22+
"exclude": ["src/**/*.pw.spec.ts"]
2423
}

packages/fast-html/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
"./rules/*.yml"
2222
],
2323
"scripts": {
24-
"build:tsc": "tsc -p ./tsconfig.json",
24+
"build:tsc": "tsgo -p ./tsconfig.json",
2525
"build": "npm run build:tsc && npm run doc && npm run build:fixtures",
2626
"build:fixtures": "node scripts/build-fixtures.js",
2727
"build:fixtures:webui": "node scripts/build-fixtures-with-webui.js",
2828
"clean": "clean dist temp test-results",
2929
"dev:full": "concurrently -k -n fast-element,fast-html,server \"npm run dev --workspace=@microsoft/fast-element\" \"npm:watch\" \"npm:test-server\"",
30-
"dev": "concurrently -k -n tsc,server \"npm run watch\" \"npm run test-server\"",
30+
"dev": "concurrently -k -n tsgo,server \"npm run watch\" \"npm run test-server\"",
3131
"doc:ci": "api-extractor run",
3232
"doc": "npm run doc:ci -- --local",
3333
"lint": "biome-changed",

0 commit comments

Comments
 (0)