src/version.ts

angular · packages/core/src/version.ts · typescript · MIT
dev-tools, tag:knn-classified

Angular version class and constant for runtime.

// Source: https://github.com/angular/angular | License: MIT | Copyright 2010-2026 Google LLC. https://angular.dev/license
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * @license
 * Copyright Google LLC All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://angular.dev/license
 */

/**
 * @description Represents the version of Angular
 *
 * @publicApi
 */
export class Version {
  public readonly major: string;
  public readonly minor: string;
  public readonly patch: string;

  constructor(public full: string) {
    const parts = full.split('.');
    this.major = parts[0];
    this.minor = parts[1];
    this.patch = parts.slice(2).join('.');
  }
}

/**
 * @publicApi
 */
export const

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key