PokéRogue
    Preparing search index...

    Type Alias AllExtendOptions

    type AllExtendOptions = {
        strictNever?: boolean;
    }
    Index

    Properties

    Properties

    strictNever?: boolean

    Consider never elements to match the target type only if the target type itself is never (or any).

    • When set to true (default), never is not treated as a bottom type, instead, it is treated as a type that matches only itself (or any).
    • When set to false, never is treated as a bottom type, and behaves as it normally would.
    true
    
    import type {AllExtend} from 'type-fest';

    type A = AllExtend<[1, 2, never], number, {strictNever: true}>;
    //=> false

    type B = AllExtend<[1, 2, never], number, {strictNever: false}>;
    //=> true

    type C = AllExtend<[never, never], never, {strictNever: true}>;
    //=> true

    type D = AllExtend<[never, never], never, {strictNever: false}>;
    //=> true

    type E = AllExtend<['a', 'b', never], any, {strictNever: true}>;
    //=> true

    type F = AllExtend<['a', 'b', never], any, {strictNever: false}>;
    //=> true

    type G = AllExtend<[never, 1], never, {strictNever: true}>;
    //=> false

    type H = AllExtend<[never, 1], never, {strictNever: false}>;
    //=> false