diff --git a/types/figures/figures-tests.ts b/types/figures/figures-tests.ts new file mode 100644 index 0000000000..f2c25bbe4b --- /dev/null +++ b/types/figures/figures-tests.ts @@ -0,0 +1,5 @@ +import figures = require('figures'); + +let str: string; +str = figures('✔︎ check'); +str = figures.tick; diff --git a/types/figures/index.d.ts b/types/figures/index.d.ts new file mode 100644 index 0000000000..2867326034 --- /dev/null +++ b/types/figures/index.d.ts @@ -0,0 +1,67 @@ +// Type definitions for figures 2.0 +// Project: https://github.com/sindresorhus/figures#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = figures; + +declare function figures(input: string): string; + +declare namespace figures { + const tick: string; + const cross: string; + const star: string; + const square: string; + const squareSmall: string; + const squareSmallFilled: string; + const play: string; + const circle: string; + const circleFilled: string; + const circleDotted: string; + const circleDouble: string; + const circleCircle: string; + const circleCross: string; + const circlePipe: string; + const circleQuestionMark: string; + const bullet: string; + const dot: string; + const line: string; + const ellipsis: string; + const pointer: string; + const pointerSmall: string; + const info: string; + const warning: string; + const hamburger: string; + const smiley: string; + const mustache: string; + const heart: string; + const arrowUp: string; + const arrowDown: string; + const arrowLeft: string; + const arrowRight: string; + const radioOn: string; + const radioOff: string; + const checkboxOn: string; + const checkboxOff: string; + const checkboxCircleOn: string; + const checkboxCircleOff: string; + const questionMarkPrefix: string; + const oneHalf: string; + const oneThird: string; + const oneQuarter: string; + const oneFifth: string; + const oneSixth: string; + const oneSeventh: string; + const oneEighth: string; + const oneNinth: string; + const oneTenth: string; + const twoThirds: string; + const twoFifths: string; + const threeQuarters: string; + const threeFifths: string; + const threeEighths: string; + const fourFifths: string; + const fiveSixths: string; + const fiveEighths: string; + const sevenEighth: string; +} diff --git a/types/figures/tsconfig.json b/types/figures/tsconfig.json new file mode 100644 index 0000000000..595779c25d --- /dev/null +++ b/types/figures/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "figures-tests.ts" + ] +} diff --git a/types/figures/tslint.json b/types/figures/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/figures/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }