mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 03:23:08 -06:00
mergeMapLikes: Improve type (#22237)
* mergeMapLikes: Improve type * Make source Partial<T> * T extends object * Update api baseline
This commit is contained in:
parent
6385c66215
commit
03ba8a0852
@ -83,7 +83,7 @@ namespace ts.server {
|
||||
};
|
||||
}
|
||||
|
||||
export function mergeMapLikes(target: MapLike<any>, source: MapLike<any>): void {
|
||||
export function mergeMapLikes<T extends object>(target: T, source: Partial<T>): void {
|
||||
for (const key in source) {
|
||||
if (hasProperty(source, key)) {
|
||||
target[key] = source[key];
|
||||
|
||||
@ -4966,7 +4966,7 @@ declare namespace ts.server {
|
||||
function ThrowProjectDoesNotContainDocument(fileName: string, project: Project): never;
|
||||
}
|
||||
function getDefaultFormatCodeSettings(host: ServerHost): FormatCodeSettings;
|
||||
function mergeMapLikes(target: MapLike<any>, source: MapLike<any>): void;
|
||||
function mergeMapLikes<T extends object>(target: T, source: Partial<T>): void;
|
||||
type NormalizedPath = string & {
|
||||
__normalizedPathTag: any;
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user