mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 07:17:04 +00:00
Add types for icon-gen
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
import icongen = require('icon-gen');
|
||||
|
||||
icongen('./sample.svg', './icons', { report: true })
|
||||
.then(results => {
|
||||
results[0];
|
||||
})
|
||||
.catch(err => {
|
||||
throw err;
|
||||
});
|
||||
|
||||
icongen('./sample.svg', './icons')
|
||||
.then(results => {
|
||||
results[0];
|
||||
})
|
||||
.catch(err => {
|
||||
throw err;
|
||||
});
|
||||
|
||||
icongen('./sample.svg', './icons', {
|
||||
favicon: {
|
||||
ico: [16, 24, 32, 48, 64],
|
||||
name: 'favicon-',
|
||||
sizes: [32, 57, 72, 96, 120, 128, 144, 152, 195, 228],
|
||||
},
|
||||
report: false,
|
||||
})
|
||||
.then(results => {
|
||||
results[0];
|
||||
})
|
||||
.catch(err => {
|
||||
throw err;
|
||||
});
|
||||
|
||||
icongen('./sample.svg', './icons', {
|
||||
favicon: {},
|
||||
report: false,
|
||||
})
|
||||
.then(results => {
|
||||
results[0];
|
||||
})
|
||||
.catch(err => {
|
||||
throw err;
|
||||
});
|
||||
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
// Type definitions for icon-gen 2.0
|
||||
// Project: https://github.com/akabekobeko/npm-icon-gen#readme
|
||||
// Definitions by: Florian Keller <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare namespace icongen {
|
||||
interface Options {
|
||||
favicon?: {
|
||||
ico: number[];
|
||||
name: string;
|
||||
sizes: number[];
|
||||
} | {};
|
||||
icns?: {
|
||||
name: string;
|
||||
sizes: number[];
|
||||
} | {};
|
||||
ico?: {
|
||||
name: string;
|
||||
sizes: number[];
|
||||
} | {};
|
||||
report?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
declare function icongen(src: string, dest: string, options?: icongen.Options): Promise<string[]>;
|
||||
|
||||
export = icongen;
|
||||
@@ -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",
|
||||
"icon-gen-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user