Add @carbon/type

This commit is contained in:
Vince Picone
2019-02-07 10:19:01 -06:00
parent c341f6378d
commit d4c5675d00
2 changed files with 19 additions and 4 deletions
+6
View File
@@ -0,0 +1,6 @@
import { fontFamily, fontWeight, getTypeSize, print } from "@carbon/type";
fontFamily("mono"); // $ExpectType { fontFamily: string; }
fontWeight("light"); // $ExpectType { fontWeight: number; }
print(fontFamily("mono")); // $ExpectType string
getTypeSize(2); // $ExpectType number
+13 -4
View File
@@ -2,6 +2,7 @@
// Project: https://github.com/IBM/carbon-elements/tree/master/packages/type
// Definitions by: Vince Picone <https://github.com/vpicone>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
export const bodyLong01: {
fontFamily: string;
@@ -692,13 +693,21 @@ export const styles: {
};
};
export function fontFamily(name: any): any;
export function fontFamily(
name: string
): {
fontFamily: string;
};
export function fontWeight(weight: any): any;
export function fontWeight(
weight: string
): {
fontWeight: number;
};
export function getTypeSize(step: any): any;
export function getTypeSize(step: number): number;
export function print(block: any): any;
export function print(block: object): string;
export namespace fontFamily {
const prototype: {};