Merge pull request #31166 from schultzp2020/constructor-parameters
refactor: convert constructor parameter properties for erasableSyntaxOnly compatibility
This commit is contained in:
@@ -48,7 +48,7 @@ export class ConfigReader implements Config {
|
||||
constructor(
|
||||
data: JsonObject_2 | undefined,
|
||||
context?: string,
|
||||
fallback?: ConfigReader | undefined,
|
||||
fallback?: ConfigReader,
|
||||
prefix?: string,
|
||||
);
|
||||
static fromConfigs(configs: AppConfig[]): ConfigReader;
|
||||
|
||||
@@ -139,12 +139,22 @@ export class ConfigReader implements Config {
|
||||
);
|
||||
}
|
||||
|
||||
private readonly data: JsonObject | undefined;
|
||||
private readonly context: string;
|
||||
private readonly fallback?: ConfigReader;
|
||||
private readonly prefix: string;
|
||||
|
||||
constructor(
|
||||
private readonly data: JsonObject | undefined,
|
||||
private readonly context: string = 'mock-config',
|
||||
private readonly fallback?: ConfigReader,
|
||||
private readonly prefix: string = '',
|
||||
) {}
|
||||
data: JsonObject | undefined,
|
||||
context: string = 'mock-config',
|
||||
fallback?: ConfigReader,
|
||||
prefix: string = '',
|
||||
) {
|
||||
this.data = data;
|
||||
this.context = context;
|
||||
this.fallback = fallback;
|
||||
this.prefix = prefix;
|
||||
}
|
||||
|
||||
/** {@inheritdoc Config.has} */
|
||||
has(key: string): boolean {
|
||||
|
||||
Reference in New Issue
Block a user