Skip to content

Commit

Permalink
ts: move definition file into dist/pad.d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
wdavidw committed May 3, 2019
1 parent eee1a01 commit 5f5003e
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 56 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@

# Changelog

## Trunk

* ts: move definition file into dist/pad.d.ts

## Version 3.0.0

Backward incompatibility:
Expand Down
File renamed without changes.
54 changes: 0 additions & 54 deletions lib/index.js

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@
"patch": "npm version patch -m 'Bump to version %s'",
"minor": "npm version minor -m 'Bump to version %s'",
"major": "npm version major -m 'Bump to version %s'",
"build": "coffee -b -o lib src && rollup -c",
"build": "coffee -b -o lib src && rollup -c && rm -r lib && cp -p src/index.d.ts dist/pad.d.ts",
"pretest": "npm run build",
"test": "mocha test/**/*.coffee"
},
"dependencies": {
"wcwidth": "^1.0.1"
},
"types": "lib/index.d.ts"
"types": "dist/pad.d.ts"
}
18 changes: 18 additions & 0 deletions src/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Type definitions for pad 1.1
// Project: https://github.com/wdavidw/node-pad#readme
// Definitions by: Mohamed Hegazy <https://github.com/mhegazy>
// windware <https://github.com/windware>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

export = pad;

/** Left pad */
declare function pad(length: number, text: string, char?: string): string;
// tslint:disable-next-line unified-signatures
declare function pad(length: number, text: string, options?: { char?: string, colors?: boolean, strip?: boolean }): string;
/** Right pad */
declare function pad(text: string, length: number, char?: string): string;
// tslint:disable-next-line unified-signatures
declare function pad(text: string, length: number, options?: { char?: string, colors?: boolean, strip?: boolean }): string;

declare namespace pad {}

0 comments on commit 5f5003e

Please sign in to comment.