mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 23:07:06 +00:00
add types for intrinsic-scale
This commit is contained in:
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
// Type definitions for intrinsic-scale 3.0
|
||||
// Project: https://github.com/bfred-it/intrinsic-scale#readme
|
||||
// Definitions by: My Self <https://github.com/me>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
|
||||
export function contain(parentWidth: number, parentHeight: number, childWidth: number, childHeight: number): IntrinsicScale;
|
||||
export function cover(parentWidth: number, parentHeight: number, childWidth: number, childHeight: number): IntrinsicScale;
|
||||
|
||||
export interface IntrinsicScale {
|
||||
width: number,
|
||||
height: number,
|
||||
x: number,
|
||||
y: number
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
import { cover, contain } from ".";
|
||||
|
||||
const intrinsicScale = cover(100, 100, 50, 50);
|
||||
const { x, y, width, height } = contain(1,2,3,4);
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"intrinsic-scale-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user