mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-28 07:40:30 -04:00
Merge from vscode 64980ea1f3f532c82bb6c28d27bba9ef2c5b4463 (#7206)
* Merge from vscode 64980ea1f3f532c82bb6c28d27bba9ef2c5b4463 * fix config changes * fix strictnull checks
This commit is contained in:
@@ -23,39 +23,39 @@ export namespace _util {
|
||||
// --- interfaces ------
|
||||
|
||||
export interface IConstructorSignature0<T> {
|
||||
new(...services: { _serviceBrand: any; }[]): T;
|
||||
new(...services: { _serviceBrand: undefined; }[]): T;
|
||||
}
|
||||
|
||||
export interface IConstructorSignature1<A1, T> {
|
||||
new(first: A1, ...services: { _serviceBrand: any; }[]): T;
|
||||
new(first: A1, ...services: { _serviceBrand: undefined; }[]): T;
|
||||
}
|
||||
|
||||
export interface IConstructorSignature2<A1, A2, T> {
|
||||
new(first: A1, second: A2, ...services: { _serviceBrand: any; }[]): T;
|
||||
new(first: A1, second: A2, ...services: { _serviceBrand: undefined; }[]): T;
|
||||
}
|
||||
|
||||
export interface IConstructorSignature3<A1, A2, A3, T> {
|
||||
new(first: A1, second: A2, third: A3, ...services: { _serviceBrand: any; }[]): T;
|
||||
new(first: A1, second: A2, third: A3, ...services: { _serviceBrand: undefined; }[]): T;
|
||||
}
|
||||
|
||||
export interface IConstructorSignature4<A1, A2, A3, A4, T> {
|
||||
new(first: A1, second: A2, third: A3, fourth: A4, ...services: { _serviceBrand: any; }[]): T;
|
||||
new(first: A1, second: A2, third: A3, fourth: A4, ...services: { _serviceBrand: undefined; }[]): T;
|
||||
}
|
||||
|
||||
export interface IConstructorSignature5<A1, A2, A3, A4, A5, T> {
|
||||
new(first: A1, second: A2, third: A3, fourth: A4, fifth: A5, ...services: { _serviceBrand: any; }[]): T;
|
||||
new(first: A1, second: A2, third: A3, fourth: A4, fifth: A5, ...services: { _serviceBrand: undefined; }[]): T;
|
||||
}
|
||||
|
||||
export interface IConstructorSignature6<A1, A2, A3, A4, A5, A6, T> {
|
||||
new(first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6, ...services: { _serviceBrand: any; }[]): T;
|
||||
new(first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6, ...services: { _serviceBrand: undefined; }[]): T;
|
||||
}
|
||||
|
||||
export interface IConstructorSignature7<A1, A2, A3, A4, A5, A6, A7, T> {
|
||||
new(first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6, seventh: A7, ...services: { _serviceBrand: any; }[]): T;
|
||||
new(first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6, seventh: A7, ...services: { _serviceBrand: undefined; }[]): T;
|
||||
}
|
||||
|
||||
export interface IConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T> {
|
||||
new(first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6, seventh: A7, eigth: A8, ...services: { _serviceBrand: any; }[]): T;
|
||||
new(first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6, seventh: A7, eigth: A8, ...services: { _serviceBrand: undefined; }[]): T;
|
||||
}
|
||||
|
||||
export interface ServicesAccessor {
|
||||
@@ -67,7 +67,7 @@ export const IInstantiationService = createDecorator<IInstantiationService>('ins
|
||||
|
||||
export interface IInstantiationService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
/**
|
||||
* Synchronously creates an instance that is denoted by
|
||||
|
||||
@@ -28,7 +28,7 @@ class CyclicDependencyError extends Error {
|
||||
|
||||
export class InstantiationService implements IInstantiationService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private readonly _services: ServiceCollection;
|
||||
private readonly _strict: boolean;
|
||||
|
||||
@@ -12,48 +12,48 @@ import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
||||
let IService1 = createDecorator<IService1>('service1');
|
||||
|
||||
interface IService1 {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
c: number;
|
||||
}
|
||||
|
||||
class Service1 implements IService1 {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
c = 1;
|
||||
}
|
||||
|
||||
let IService2 = createDecorator<IService2>('service2');
|
||||
|
||||
interface IService2 {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
d: boolean;
|
||||
}
|
||||
|
||||
class Service2 implements IService2 {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
d = true;
|
||||
}
|
||||
|
||||
let IService3 = createDecorator<IService3>('service3');
|
||||
|
||||
interface IService3 {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
s: string;
|
||||
}
|
||||
|
||||
class Service3 implements IService3 {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
s = 'farboo';
|
||||
}
|
||||
|
||||
let IDependentService = createDecorator<IDependentService>('dependentService');
|
||||
|
||||
interface IDependentService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
name: string;
|
||||
}
|
||||
|
||||
class DependentService implements IDependentService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
constructor(@IService1 service: IService1) {
|
||||
assert.equal(service.c, 1);
|
||||
}
|
||||
@@ -116,7 +116,7 @@ class DependentServiceTarget2 {
|
||||
|
||||
|
||||
class ServiceLoop1 implements IService1 {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
c = 1;
|
||||
|
||||
constructor(@IService2 s: IService2) {
|
||||
@@ -125,7 +125,7 @@ class ServiceLoop1 implements IService1 {
|
||||
}
|
||||
|
||||
class ServiceLoop2 implements IService2 {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
d = true;
|
||||
|
||||
constructor(@IService1 s: IService1) {
|
||||
@@ -364,7 +364,7 @@ suite('Instantiation Service', () => {
|
||||
let serviceInstanceCount = 0;
|
||||
|
||||
const CtorCounter = class implements Service1 {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
c = 1;
|
||||
constructor() {
|
||||
serviceInstanceCount += 1;
|
||||
|
||||
Reference in New Issue
Block a user