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
  • InputSignalWithTransform
  • Signal
  • InputSignal

This view

  • Original page
  • New address

GeezerVison is showing angular.dev — InputSignalWithTransform • Angular

API

    
      interface InputSignalWithTransform<T, TransformT> extends Signal<T> {}
    
    

Description

InputSignalWithTransform represents a special Signal for a directive/component input with a transform function.

Signal inputs with transforms capture an extra generic for their transform write type. Transforms can expand the accepted bound values for an input while ensuring value retrievals of the signal input are still matching the generic input type.

class MyDir {
  disabled = input(false, {
    transform: (v: string|boolean) => convertToBoolean(v),
  }); // InputSignalWithTransform<boolean, string|boolean>

  click() {
    this.disabled() // always returns a `boolean`.
  }
}
You are visitor 01402503 — 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.