@anttiviljami/dtsgenerator
Advanced tools
Comparing version 3.19.3 to 3.20.0
@@ -56,2 +56,5 @@ "use strict"; | ||
function buildNumericLiteralTypeNode(n) { | ||
if (!isNaN(parseFloat(n)) && parseFloat(n) < 0) { | ||
return ts.factory.createLiteralTypeNode(ts.factory.createPrefixUnaryExpression(ts.SyntaxKind.MinusToken, ts.factory.createNumericLiteral(Math.abs(parseFloat(n))))); | ||
} | ||
return ts.factory.createLiteralTypeNode(ts.factory.createNumericLiteral(n)); | ||
@@ -58,0 +61,0 @@ } |
{ | ||
"name": "@anttiviljami/dtsgenerator", | ||
"version": "3.19.3", | ||
"version": "3.20.0", | ||
"description": "TypeScript d.ts file generator for JSON Schema file", | ||
@@ -5,0 +5,0 @@ "bin": { |
@@ -51,2 +51,11 @@ import * as ts from 'typescript'; | ||
export function buildNumericLiteralTypeNode(n: string): ts.LiteralTypeNode { | ||
if (!isNaN(parseFloat(n)) && parseFloat(n) < 0) { | ||
return ts.factory.createLiteralTypeNode( | ||
ts.factory.createPrefixUnaryExpression( | ||
ts.SyntaxKind.MinusToken, | ||
ts.factory.createNumericLiteral(Math.abs(parseFloat(n))), | ||
), | ||
); | ||
} | ||
return ts.factory.createLiteralTypeNode(ts.factory.createNumericLiteral(n)); | ||
@@ -53,0 +62,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
382878
8498