From 73a7a2d99ff63502d7fb426133a340fadc945538 Mon Sep 17 00:00:00 2001 From: Jinesh Shah Date: Thu, 3 May 2018 11:28:43 -0400 Subject: [PATCH] Added feather-icons (#25509) * added feather-icons * added strictfunctiontypes * added intercom-client --- types/feather-icons/feather-icons-tests.ts | 7 +++++++ types/feather-icons/index.d.ts | 22 ++++++++++++++++++++++ types/feather-icons/tsconfig.json | 16 ++++++++++++++++ types/feather-icons/tslint.json | 1 + 4 files changed, 46 insertions(+) create mode 100644 types/feather-icons/feather-icons-tests.ts create mode 100644 types/feather-icons/index.d.ts create mode 100644 types/feather-icons/tsconfig.json create mode 100644 types/feather-icons/tslint.json diff --git a/types/feather-icons/feather-icons-tests.ts b/types/feather-icons/feather-icons-tests.ts new file mode 100644 index 0000000000..fc71f25798 --- /dev/null +++ b/types/feather-icons/feather-icons-tests.ts @@ -0,0 +1,7 @@ +import * as feather from "feather-icons"; + +feather.replace(); // $ExpectType void +feather.icons[""].toSvg(); // $ExpectType string +feather.icons[""].name; // $ExpectType string +feather.icons[""].contents; // $ExpectType string +feather.icons[""].tags; // $ExpectType string[] diff --git a/types/feather-icons/index.d.ts b/types/feather-icons/index.d.ts new file mode 100644 index 0000000000..34acfb80aa --- /dev/null +++ b/types/feather-icons/index.d.ts @@ -0,0 +1,22 @@ +// Type definitions for feather-icons 4.7 +// Project: https://github.com/feathericons/feather#readme +// Definitions by: Jinesh Shah +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export as namespace feather; + +export interface FeatherAttributes { + [key: string]: string | number; +} + +export function replace(options?: FeatherAttributes): void; + +export const icons: { + [key: string]: { + name: string; + contents: string; + tags: string[]; + attrs: FeatherAttributes; + toSvg: (options?: FeatherAttributes) => string; + }; +}; diff --git a/types/feather-icons/tsconfig.json b/types/feather-icons/tsconfig.json new file mode 100644 index 0000000000..ab8237b4de --- /dev/null +++ b/types/feather-icons/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": ["index.d.ts", "feather-icons-tests.ts"] +} diff --git a/types/feather-icons/tslint.json b/types/feather-icons/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/feather-icons/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }