Narcissistic Project Managers

    funny-types-fixed-array-size
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.2 • Public • Published

    Fixed Size Array

    Based on this comment

    import {FixedSizeArray} from 'funny-types/fixed-array-size'
     
    const goodArray: FixedSizeArray<number, 2> = [1, 2]

    And you'll have type error if:

    import {FixedSizeArray} from 'funny-types/fixed-array-size'
     
    const array: FixedSizeArray<number, 2> = [1, 2, 3]

    or

    import {FixedSizeArray} from 'funny-types/fixed-array-size'
     
    const array: FixedSizeArray<number, 2> = [1, 2]
    array[2] = 5

    Install

    npm i funny-types-fixed-array-size

    DownloadsWeekly Downloads

    3

    Version

    0.0.2

    License

    none

    Unpacked Size

    976 B

    Total Files

    3

    Last publish

    Collaborators

    • zavodnoyapl