refactor(core): remove readonly getters in common, compiler (#19150)
PR Close #19150
This commit is contained in:
@ -207,13 +207,16 @@ export function isPromise(obj: any): obj is Promise<any> {
|
||||
}
|
||||
|
||||
export class Version {
|
||||
constructor(public full: string) {}
|
||||
public readonly major: string;
|
||||
public readonly minor: string;
|
||||
public readonly patch: string;
|
||||
|
||||
get major(): string { return this.full.split('.')[0]; }
|
||||
|
||||
get minor(): string { return this.full.split('.')[1]; }
|
||||
|
||||
get patch(): string { return this.full.split('.').slice(2).join('.'); }
|
||||
constructor(public full: string) {
|
||||
const splits = full.split('.');
|
||||
this.major = splits[0];
|
||||
this.minor = splits[1];
|
||||
this.patch = splits.slice(2).join('.');
|
||||
}
|
||||
}
|
||||
|
||||
export interface Console {
|
||||
|
Reference in New Issue
Block a user