mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 15:27:05 +00:00
refactor and fix linting
This commit is contained in:
Vendored
+11
-13
@@ -2,9 +2,11 @@
|
||||
// Project: https://github.com/styled-components/styled-theming#readme
|
||||
// Definitions by: Arjan Jassal <https://github.com/ArjanJ>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.1.1
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
declare module "styled-theming" {
|
||||
declare function theme(name: string, values: theme.ThemeMap): theme.ThemeSet;
|
||||
|
||||
declare namespace theme {
|
||||
type ThemeValueFn = (props: object) => string;
|
||||
type ThemeValue = string | ThemeValueFn;
|
||||
|
||||
@@ -19,15 +21,11 @@ declare module "styled-theming" {
|
||||
type ThemeSet = (props: object) => string;
|
||||
type VariantSet = (props: object) => string;
|
||||
|
||||
namespace theme {
|
||||
export function variants(
|
||||
name: string,
|
||||
prop: string,
|
||||
values: VariantMap
|
||||
): VariantSet;
|
||||
}
|
||||
|
||||
function theme(name: string, values: ThemeMap): ThemeSet;
|
||||
|
||||
export = theme;
|
||||
function variants(
|
||||
name: string,
|
||||
prop: string,
|
||||
values: VariantMap
|
||||
): VariantSet;
|
||||
}
|
||||
|
||||
export default theme;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as theme from "styled-theming";
|
||||
import theme from "styled-theming";
|
||||
|
||||
const textColor = theme("mode", {
|
||||
dark: "white",
|
||||
|
||||
@@ -1,22 +1,16 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"lib": ["es6"],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"typeRoots": ["../"],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"styled-theming-tests.ts"
|
||||
]
|
||||
"files": ["index.d.ts", "styled-theming-tests.ts"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user