Skip to content

Commit 0342d55

Browse files
authoredSep 18, 2022
Merge pull request #35 from ombr/types
Fix types
2 parents cf9c7ad + 18b9b72 commit 0342d55

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "referentiel",
3-
"version": "2.0.0-alpha2",
3+
"version": "2.0.0-alpha3",
44
"description": "Convert position relative to a html element.",
55
"main": "dist/referentiel.js",
6-
"types": "dist/index.d.ts",
6+
"types": "dist/referentiel.d.ts",
77
"module": "dist/referentiel.js",
88
"directories": {
99
"test": "test"

‎src/referentiel.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ class Referentiel {
5757
if (a === undefined || b === undefined) throw new Error("Oh no !");
5858
if (Array.isArray(a) || Array.isArray(b))
5959
throw new Error("We are not expecting an array");
60-
return [this.export(a), this.export(b)];
60+
return [Referentiel.exportNumber(a), Referentiel.exportNumber(b)];
6161
}
6262

63-
export(v: MathNumericType): number {
63+
static exportNumber(v: MathNumericType): number {
6464
return parseFloat(v.toString());
6565
}
6666

0 commit comments

Comments
 (0)