GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Docs
  • Tutorials
  • Playground
  • Reference
  • code
  • Using the schema with apply

This view

  • Original page
  • New address

GeezerVison is showing next.angular.dev — apply • Angular

API

function apply<TValue>(
  path: SchemaPath<TValue>,
  schema: NoInfer<SchemaOrSchemaFn<TValue>>,
): void;
@parampathSchemaPath<TValue>

The target path to apply the schema to.

@paramschemaNoInfer<SchemaOrSchemaFn<TValue>>

The schema to apply to the property

@returnsvoid

Usage Notes

const nameSchema = schema<{first: string, last: string}>((name) => {
  required(name.first);
  required(name.last);
});
const profileForm = form(signal({name: {first: '', last: ''}, age: 0}), (profile) => {
  apply(profile.name, nameSchema);
});
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.