Skip to content

Face

Face is an interface that is implemented by Alphanumeric, Clock, ElapsedTime and Counter. The Face interface must be implemented if you are creating your own face. In addition to the required methods, all the Event Hook methods are available too.

ts
interface Face<T extends Face<T> = any> extends FaceHooks<T> {
    /**
     * The face's value to display. When this value changes, or a new
     * `FaceValue` instance has been returned, the clock will automatically
     * re-render.
     *
     * @public
     */
    faceValue(): FaceValue<any>;
    /**
     * This method is called with every timer interval. Use this to increment,
     * decrement or value change the `faceValue()`.
     *
     * @public
     */
    interval(instance: FlipClock<T>): void;
}

Released under the MIT License.