mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Added gematriya types (#37361)
This commit is contained in:
committed by
Nathan Shively-Sanders
parent
a0f0663dfa
commit
aeafe3ea2d
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// Type definitions for gematriya 2.0
|
||||
// Project: https://github.com/Scimonster/js-gematriya
|
||||
// Definitions by: Mendy Berger <https://github.com/MendyBerger>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare global {
|
||||
function gematriya(num: number, options?: { limit?: number, punctuate?: boolean, geresh?: boolean }): string;
|
||||
function gematriya(str: string, options?: { order?: boolean }): number;
|
||||
}
|
||||
export = gematriya;
|
||||
@@ -0,0 +1,11 @@
|
||||
gematriya(5774); // $ExpectType string
|
||||
gematriya(5774, {limit: 3}); // $ExpectType string
|
||||
gematriya(5774, {limit: 7}); // $ExpectType string
|
||||
gematriya(5774, {punctuate: false}); // $ExpectType string
|
||||
gematriya(5774, {punctuate: true}); // $ExpectType string
|
||||
gematriya(5774, {geresh: false}); // $ExpectType string
|
||||
gematriya(5774, {punctuate: false, limit: 3}); // $ExpectType string
|
||||
gematriya(3); // $ExpectType string
|
||||
gematriya(3, {geresh: false}); // $ExpectType string
|
||||
gematriya('התשעד', {order: true}); // $ExpectType number
|
||||
gematriya('התשעד', {order: false}); // $ExpectType number
|
||||
@@ -0,0 +1,13 @@
|
||||
import gematriya = require("gematriya");
|
||||
|
||||
gematriya(5774); // $ExpectType string
|
||||
gematriya(5774, {limit: 3}); // $ExpectType string
|
||||
gematriya(5774, {limit: 7}); // $ExpectType string
|
||||
gematriya(5774, {punctuate: false}); // $ExpectType string
|
||||
gematriya(5774, {punctuate: true}); // $ExpectType string
|
||||
gematriya(5774, {geresh: false}); // $ExpectType string
|
||||
gematriya(5774, {punctuate: false, limit: 3}); // $ExpectType string
|
||||
gematriya(3); // $ExpectType string
|
||||
gematriya(3, {geresh: false}); // $ExpectType string
|
||||
gematriya('התשעד', {order: true}); // $ExpectType number
|
||||
gematriya('התשעד', {order: false}); // $ExpectType number
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"test/gematriya-module-tests.ts",
|
||||
"test/gematriya-global-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user