@ngtools/json-schema

  • Version 1.1.0
  • Published
  • No dependencies
  • MIT license

Install

npm i @ngtools/json-schema
yarn add @ngtools/json-schema
pnpm add @ngtools/json-schema

Overview

Schema validating and reading for configurations, similar to Angular CLI config.

Index

Functions

function SchemaClassFactory

SchemaClassFactory: <T>(schema: Object) => SchemaClassFactoryReturn<T>;
  • Create a class from a JSON SCHEMA object. Instanciating that class with an object allows for extended behaviour. This is the base API to access the Configuration in the CLI.

    Parameter schema

    Returns

    {GeneratedSchemaClass}

Interfaces

interface SchemaClass

interface SchemaClass<JsonType> extends Object {}
  • The interface the SchemaClassFactory returned class implements.

method $$alias

$$alias: (source: string, destination: string) => boolean;

    method $$defined

    $$defined: (path: string) => boolean;

      method $$delete

      $$delete: (path: string) => void;

        method $$dispose

        $$dispose: () => void;

          method $$get

          $$get: (path: string) => any;

            method $$root

            $$root: () => JsonType;

              method $$schema

              $$schema: () => RootSchemaTreeNode;

                method $$serialize

                $$serialize: (mimetype?: string, ...args: any[]) => string;

                  method $$set

                  $$set: (path: string, value: any) => void;

                    method $$typeOf

                    $$typeOf: (path: string) => string;

                      Package Files (2)

                      Dependencies (0)

                      No dependencies.

                      Dev Dependencies (0)

                      No dev dependencies.

                      Peer Dependencies (0)

                      No peer dependencies.

                      Badge

                      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@ngtools/json-schema.

                      • Markdown
                        [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@ngtools/json-schema)
                      • HTML
                        <a href="https://www.jsdocs.io/package/@ngtools/json-schema"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>