@types/modular-scale
TypeScript icon, indicating that this package has built-in type declarations

5.1.4 • Public • Published

Installation

npm install --save @types/modular-scale

Summary

This package contains type definitions for modular-scale (https://github.com/kristoferjoseph/modular-scale).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/modular-scale.

index.d.ts

export interface ModularScaleOptions {
    /** The ratio to use in the generated type scale function. Defaults to ModularScaleRatio.goldenSection */
    ratio?: number | undefined;

    /** The base font size (in pixels) to use for the type scale. Defaults to 16 */
    base?: number | string | undefined;
}

export interface ModularScaleRatio {
    minorSecond: number;
    majorSecond: number;
    minorThird: number;
    majorThird: number;
    perfectFourth: number;
    augFourth: number;
    perfectFifth: number;
    minorSixth: number;
    goldenSection: number;
    majorSixth: number;
    minorSeventh: number;
    majorSeventh: number;
    octave: number;
    majorTenth: number;
    majorEleventh: number;
    majorTwelfth: number;
    doubleOctave: number;
}

export interface modularScale {
    (step: number, relative?: boolean): number;
    steps(steps: number, relative?: boolean): number[];
}

export const ratios: ModularScaleRatio;

export default function ModularScale(options: ModularScaleOptions): modularScale;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by Mike Fowler.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/modular-scale

Weekly Downloads

14

Version

5.1.4

License

MIT

Unpacked Size

4.65 kB

Total Files

5

Last publish

Collaborators

  • types