XYO Platform SDK - v3.10.6
    Preparing search index...

    Variable AsTypeFactoryConst

    AsTypeFactory: {
        create: <T extends AnyNonPromise>(
            typeCheck: TypeCheck<T>,
        ) => {
            <TType extends AnyNonPromise>(
                value: AnyNonPromise,
                config?: TypeCheckConfig,
            ): undefined | TType;
            <TType extends AnyNonPromise>(
                value: AnyNonPromise,
                assert: StringOrAlertFunction<T>,
                config?: TypeCheckConfig,
            ): TType;
        };
        createOptional: <T extends AnyNonPromise>(
            typeCheck: TypeCheck<T>,
        ) => <TType extends T>(value: AnyNonPromise) => TType | undefined;
    }

    Type declaration

    • create: <T extends AnyNonPromise>(
          typeCheck: TypeCheck<T>,
      ) => {
          <TType extends AnyNonPromise>(
              value: AnyNonPromise,
              config?: TypeCheckConfig,
          ): undefined | TType;
          <TType extends AnyNonPromise>(
              value: AnyNonPromise,
              assert: StringOrAlertFunction<T>,
              config?: TypeCheckConfig,
          ): TType;
      }
    • createOptional: <T extends AnyNonPromise>(
          typeCheck: TypeCheck<T>,
      ) => <TType extends T>(value: AnyNonPromise) => TType | undefined