@types/js-quantities
Advanced tools
+58
-64
@@ -1,79 +0,73 @@ | ||
| // Type definitions for JS-quantities | ||
| // Type definitions for JS-quantities 1.6 | ||
| // Project: http://gentooboontoo.github.io/js-quantities/ | ||
| // Definitions by: William Comartin <https://github.com/wcomartin> | ||
| // Definitions by: William Rummler <https://github.com/wrummler> | ||
| // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
| declare var Qty: QtyModule.QtyStatic; | ||
| declare const Qty: Qty.Type; | ||
| declare namespace QtyModule { | ||
| interface QtyStatic { | ||
| (value: string): Qty; | ||
| (value: number): Qty; | ||
| (value: number, unit: string): Qty; | ||
| (value: Qty): Qty; | ||
| } | ||
| interface Qty { | ||
| version: string; | ||
| scalar: number; | ||
| baseScalar: number; | ||
| parse(value: string): Qty; | ||
| swiftConverter(srcUnits:string, dstUnits:string): (value:number) => number; | ||
| getkinds(): string[]; | ||
| getUnits(kind:string): string[]; | ||
| getAliases(unitName:string): string[]; | ||
| formatter(scalar:number, units:string):string; | ||
| toFloat(): number; | ||
| declare interface Qty { | ||
| readonly numerator: string[]; | ||
| readonly denominator: string[]; | ||
| readonly scalar: number; | ||
| readonly baseScalar: number; | ||
| readonly initValue: string; | ||
| units(): string; | ||
| isCompatible(value: Qty.UnitSource): boolean; | ||
| kind(): string; | ||
| isUnitless(): boolean; | ||
| isCompatible(other:string|Qty): boolean; | ||
| isInverse(other:string|Qty): boolean | ||
| kind(): string; | ||
| isBase(): boolean; | ||
| toBase(): Qty; | ||
| toFloat(): number; | ||
| to(value: Qty.UnitSource): Qty; | ||
| inverse(): Qty; | ||
| eq(value: Qty.UnitSource): boolean; | ||
| same(value: Qty.UnitSource): boolean; | ||
| lt(value: Qty.UnitSource): boolean; | ||
| lte(value: Qty.UnitSource): boolean; | ||
| gt(value: Qty.UnitSource): boolean; | ||
| gte(value: Qty.UnitSource): boolean; | ||
| compareTo(value: Qty): Qty.ComparisonResult; | ||
| add(value: Qty.Source): Qty; | ||
| sub(value: Qty.Source): Qty; | ||
| mul(value: Qty.Source): Qty; | ||
| div(value: Qty.Source): Qty; | ||
| toPrec(value: Qty.Source): Qty; | ||
| toString(valueOrPrecision?: Qty.Source): string; | ||
| toString(value: string, precision: number): string; | ||
| format(formatter?: Qty.Formatter): string; | ||
| format(value: string, formatter?: Qty.Formatter): string; | ||
| } | ||
| units(): string; | ||
| declare namespace Qty { | ||
| eq(other:Qty): boolean; | ||
| lt(other:Qty): boolean; | ||
| lte(other:Qty): boolean; | ||
| gt(other:Qty): boolean; | ||
| gte(other:Qty): boolean; | ||
| interface Type { | ||
| (value: Source): Qty; | ||
| (value: number, unit: string): Qty; | ||
| new (value: Source): Qty; | ||
| new (value: number, unit: string): Qty; | ||
| parse(value: string): Qty; | ||
| getKinds(): string[]; | ||
| getUnits(kind?: string): string[]; | ||
| getAliases(unit: string): string[]; | ||
| swiftConverter(sourceUnit: string, targetUnit: string): Converter; | ||
| formatter: Formatter; | ||
| readonly Error: any; | ||
| mulSafe(n1: number, n2: number): number; | ||
| divSafe(n1: number, n2: number): number; | ||
| } | ||
| toPrec(precQuantity: Qty|string|number): Qty; | ||
| interface Converter { | ||
| (sourceValue: number): number; | ||
| (sourceValues: number[]): number[]; | ||
| } | ||
| toString(targetUnitsOrMaxDecimalsOrPrec?:number|string|Qty, maxDecimals?: number): string; | ||
| type Formatter = (scalar: number, unit: string) => string; | ||
| format(targetUnits?:string, formatter?:(scalar:number, units:string) => string): string; | ||
| type ComparisonResult = -1 | 0 | 1; | ||
| compareTo(other:Qty|string): number; | ||
| type Source = UnitSource | number; | ||
| same(other: Qty): boolean; | ||
| type UnitSource = Qty | string; | ||
| } | ||
| inverse(): Qty; | ||
| isDegrees(): boolean; | ||
| isTemperature(): boolean; | ||
| to(other:string|Qty): Qty; | ||
| add(other:string|Qty): Qty; | ||
| sub(other:string|Qty): Qty; | ||
| mul(other:number|string|Qty): Qty; | ||
| div(other:number|string|Qty): Qty; | ||
| } | ||
| } | ||
| export default Qty; |
| { | ||
| "name": "@types/js-quantities", | ||
| "version": "0.0.5", | ||
| "version": "1.6.0", | ||
| "description": "TypeScript definitions for JS-quantities", | ||
| "license": "MIT", | ||
| "author": "William Comartin <https://github.com/wcomartin>", | ||
| "author": "William Rummler <https://github.com/wrummler>", | ||
| "main": "", | ||
@@ -15,4 +15,4 @@ "repository": { | ||
| "peerDependencies": {}, | ||
| "typings": "index.d.ts", | ||
| "typesPublisherContentHash": "f4c0db9b672339190e5893055b80b06af498b9ae9873a2262b3638dbabf0e980" | ||
| "typesPublisherContentHash": "9fba36480b1e1f115f3dac35659cc3695ac8430c40f98cac29dab39e574b68bb", | ||
| "typeScriptVersion": "2.0" | ||
| } |
@@ -8,12 +8,11 @@ # Installation | ||
| # Details | ||
| Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/js-quantities | ||
| Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/js-quantities | ||
| Additional Details | ||
| * Last updated: Wed, 05 Oct 2016 20:53:34 GMT | ||
| * File structure: Global | ||
| * Last updated: Thu, 05 Jan 2017 20:40:29 GMT | ||
| * Library Dependencies: none | ||
| * Module Dependencies: none | ||
| * Global values: Qty | ||
| * Global values: none | ||
| # Credits | ||
| These definitions were written by William Comartin <https://github.com/wcomartin>. | ||
| These definitions were written by William Rummler <https://github.com/wrummler>. |
| { | ||
| "authors": "William Comartin <https://github.com/wcomartin>", | ||
| "definitionFilename": "index.d.ts", | ||
| "authors": "William Rummler <https://github.com/wrummler>", | ||
| "libraryDependencies": [], | ||
| "moduleDependencies": [], | ||
| "libraryMajorVersion": "0", | ||
| "libraryMinorVersion": "0", | ||
| "libraryMajorVersion": 1, | ||
| "libraryMinorVersion": 6, | ||
| "typeScriptVersion": "2.0", | ||
| "libraryName": "JS-quantities", | ||
@@ -12,8 +12,7 @@ "typingsPackageName": "js-quantities", | ||
| "sourceRepoURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped", | ||
| "sourceBranch": "types-2.0", | ||
| "kind": "Global", | ||
| "globals": [ | ||
| "Qty" | ||
| "sourceBranch": "master", | ||
| "globals": [], | ||
| "declaredModules": [ | ||
| "js-quantities" | ||
| ], | ||
| "declaredModules": [], | ||
| "files": [ | ||
@@ -23,3 +22,3 @@ "index.d.ts" | ||
| "hasPackageJson": false, | ||
| "contentHash": "f4c0db9b672339190e5893055b80b06af498b9ae9873a2262b3638dbabf0e980" | ||
| "contentHash": "9fba36480b1e1f115f3dac35659cc3695ac8430c40f98cac29dab39e574b68bb" | ||
| } |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
4174
12.84%84
18.31%1
-50%18
-5.26%