Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pick up latest TS for building VS Code #233369

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
"ts-node": "^10.9.1",
"tsec": "0.2.7",
"tslib": "^2.6.3",
"typescript": "^5.7.0-dev.20241104",
"typescript": "^5.8.0-dev.20241107",
"typescript-eslint": "^8.8.0",
"util": "^0.12.4",
"webpack": "^5.94.0",
Expand Down Expand Up @@ -240,4 +240,4 @@
"optionalDependencies": {
"windows-foreground-love": "0.5.0"
}
}
}
4 changes: 3 additions & 1 deletion src/vs/platform/configuration/common/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,9 @@ function doRemoveFromValueTree(valueTree: any, segments: string[]): void {
/**
* A helper function to get the configuration value with a specific settings path (e.g. config.some.setting)
*/
export function getConfigurationValue<T>(config: any, settingPath: string, defaultValue?: T): T {
export function getConfigurationValue<T>(config: any, settingPath: string): T | undefined;
export function getConfigurationValue<T>(config: any, settingPath: string, defaultValue: T): T;
export function getConfigurationValue<T>(config: any, settingPath: string, defaultValue?: T): T | undefined {
function accessSetting(config: any, path: string[]): any {
let current = config;
for (const component of path) {
Expand Down
4 changes: 2 additions & 2 deletions src/vs/platform/contextkey/browser/contextKeyService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,8 @@ class OverlayContext implements IContext {

constructor(private parent: IContext, private overlay: ReadonlyMap<string, any>) { }

getValue<T>(key: string): T | undefined {
return this.overlay.has(key) ? this.overlay.get(key) : this.parent.getValue(key);
getValue<T extends ContextKeyValue>(key: string): T | undefined {
return this.overlay.has(key) ? this.overlay.get(key) : this.parent.getValue<T>(key);
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/vs/platform/observable/common/wrapInHotClass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import { isHotReloadEnabled } from '../../../base/common/hotReload.js';
import { IDisposable } from '../../../base/common/lifecycle.js';
import { autorunWithStore, IObservable } from '../../../base/common/observable.js';
import { BrandedService, GetLeadingNonServiceArgs, IInstantiationService } from '../../instantiation/common/instantiation.js';
import { BrandedService, IInstantiationService } from '../../instantiation/common/instantiation.js';

export function hotClassGetOriginalInstance<T>(value: T): T {
if (value instanceof BaseClass) {
Expand All @@ -19,7 +19,7 @@ export function hotClassGetOriginalInstance<T>(value: T): T {
* When the wrapper is created, the original class is created.
* When the original class changes, the instance is re-created.
*/
export function wrapInHotClass0<TArgs extends BrandedService[]>(clazz: IObservable<Result<TArgs>>): Result<GetLeadingNonServiceArgs<TArgs>> {
export function wrapInHotClass0<TArgs extends BrandedService[]>(clazz: IObservable<Result<TArgs>>): Result<TArgs> {
return !isHotReloadEnabled() ? clazz.get() : createWrapper(clazz, BaseClass0);
}

Expand Down Expand Up @@ -61,7 +61,7 @@ class BaseClass0 extends BaseClass {
* When the wrapper is created, the original class is created.
* When the original class changes, the instance is re-created.
*/
export function wrapInHotClass1<TArgs extends [any, ...BrandedService[]]>(clazz: IObservable<Result<TArgs>>): Result<GetLeadingNonServiceArgs<TArgs>> {
export function wrapInHotClass1<TArgs extends [any, ...BrandedService[]]>(clazz: IObservable<Result<TArgs>>): Result<TArgs> {
return !isHotReloadEnabled() ? clazz.get() : createWrapper(clazz, BaseClass1);
}

Expand Down
2 changes: 1 addition & 1 deletion src/vs/platform/observable/common/wrapInReloadableClass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { BrandedService, GetLeadingNonServiceArgs, IInstantiationService } from
* When the wrapper is created, the original class is created.
* When the original class changes, the instance is re-created.
*/
export function wrapInReloadableClass0<TArgs extends BrandedService[]>(getClass: () => Result<TArgs>): Result<GetLeadingNonServiceArgs<TArgs>> {
export function wrapInReloadableClass0<TArgs extends BrandedService[]>(getClass: () => Result<TArgs>): Result<TArgs> {
return !isHotReloadEnabled() ? getClass() : createWrapper(getClass, BaseClass0);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ abstract class AbstractSettingsModel extends EditorModel {
return undefined;
}

protected collectMetadata(groups: ISearchResultGroup[]): IStringDictionary<IFilterMetadata> {
protected collectMetadata(groups: ISearchResultGroup[]): IStringDictionary<IFilterMetadata> | null {
const metadata = Object.create(null);
let hasMetadata = false;
groups.forEach(g => {
Expand Down Expand Up @@ -208,7 +208,7 @@ export class SettingsEditorModel extends AbstractSettingsModel implements ISetti
allGroups: this.settingsGroups,
filteredGroups: filteredGroup ? [filteredGroup] : [],
matches,
metadata
metadata: metadata ?? undefined
};
}
}
Expand Down Expand Up @@ -849,7 +849,7 @@ export class DefaultSettingsEditorModel extends AbstractSettingsModel implements
allGroups: this.settingsGroups,
filteredGroups,
matches,
metadata
metadata: metadata ?? undefined
} :
undefined;
}
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/services/search/common/queryBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ function splitGlobFromPath(searchPath: string): { pathPortion: string; globPorti
};
}

function patternListToIExpression(...patterns: string[]): glob.IExpression {
function patternListToIExpression(...patterns: string[]): glob.IExpression | undefined {
return patterns.length ?
patterns.reduce((glob, cur) => { glob[cur] = true; return glob; }, Object.create(null)) :
undefined;
Expand Down
Loading