mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 10:38:59 +01:00
debt - no guessing-caching, better use of gc-signals, command converter using gc-signals, main side heap service
This commit is contained in:
@@ -276,12 +276,13 @@ export interface ObjectIdentifier {
|
||||
}
|
||||
|
||||
export namespace ObjectIdentifier {
|
||||
export const name = '$ident';
|
||||
export function mixin<T>(obj: T, id: number): T & ObjectIdentifier {
|
||||
Object.defineProperty(obj, '$ident', { value: id, enumerable: true });
|
||||
Object.defineProperty(obj, name, { value: id, enumerable: true });
|
||||
return <T & ObjectIdentifier>obj;
|
||||
}
|
||||
export function get(obj: any): number {
|
||||
return obj['$ident'];
|
||||
export function of(obj: any): number {
|
||||
return obj[name];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user