mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-18 01:49:01 +00:00
🤖 Merge PR #58653 feat: add types for comma-number@2.1 by @coreyar
* feat: add types for comma-number@2.1 * Update types/comma-number/tsconfig.json Co-authored-by: Piotr Błażejewicz (Peter Blazejewicz) <peterblazejewicz@users.noreply.github.com> * Update types/comma-number/comma-number-tests.ts Co-authored-by: Piotr Błażejewicz (Peter Blazejewicz) <peterblazejewicz@users.noreply.github.com> Co-authored-by: Piotr Błażejewicz (Peter Blazejewicz) <peterblazejewicz@users.noreply.github.com>
This commit is contained in:
11
types/comma-number/comma-number-tests.ts
Normal file
11
types/comma-number/comma-number-tests.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import commaNumber = require('comma-number');
|
||||
|
||||
commaNumber('100');
|
||||
|
||||
commaNumber('100', '.');
|
||||
|
||||
commaNumber(100);
|
||||
|
||||
commaNumber(100, ',');
|
||||
|
||||
commaNumber.bindWith(',', '.');
|
||||
16
types/comma-number/index.d.ts
vendored
Normal file
16
types/comma-number/index.d.ts
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
// Type definitions for comma-number 2.1
|
||||
// Project: https://github.com/elidoran/comma-number
|
||||
// Definitions by: Corey Rice <https://github.com/coreyar>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare function commaNumber(
|
||||
inputNumber: number | string,
|
||||
optionalSeparator?: string,
|
||||
optionalDecimalChar?: string,
|
||||
): string;
|
||||
|
||||
declare namespace commaNumber {
|
||||
function bindWith(separator: string, decimalChar: string): (num: number | string) => string;
|
||||
}
|
||||
|
||||
export = commaNumber;
|
||||
23
types/comma-number/tsconfig.json
Normal file
23
types/comma-number/tsconfig.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"comma-number-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/comma-number/tslint.json
Normal file
1
types/comma-number/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "@definitelytyped/dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user