mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-09-24 18:10:25 +00:00
Merge pull request #26210 from rynclark/svg-sprite-loader
Add typings for svg-sprite-loader
This commit is contained in:
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// Type definitions for svg-sprite-loader 3.9
|
||||
// Project: https://github.com/kisenka/svg-sprite-loader/releases
|
||||
// Definitions by: Ryan Clark <https://github.com/rynclark>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
import { loader } from 'webpack';
|
||||
|
||||
export = SVGSpriteLoader;
|
||||
|
||||
declare function SVGSpriteLoader(
|
||||
this: loader.LoaderContext,
|
||||
source: string | Buffer
|
||||
): string | Buffer | void | undefined;
|
||||
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
import { Plugin } from 'webpack';
|
||||
|
||||
export = SVGSpriteLoaderPlugin;
|
||||
|
||||
declare class SVGSpriteLoaderPlugin extends Plugin {
|
||||
constructor(options?: SVGSpriteLoaderPlugin.Options);
|
||||
}
|
||||
|
||||
declare namespace SVGSpriteLoaderPlugin {
|
||||
interface Options {
|
||||
/** Render plain sprite without styles and usages */
|
||||
plainSprite?: boolean;
|
||||
/** Custom tag attributes for the svg */
|
||||
spriteAttrs?: {[key: string]: any};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import SpriteLoaderPlugin = require('svg-sprite-loader/plugin');
|
||||
|
||||
new SpriteLoaderPlugin();
|
||||
|
||||
new SpriteLoaderPlugin({ plainSprite: true });
|
||||
|
||||
new SpriteLoaderPlugin({ spriteAttrs: { testAttr: 'testValue' } });
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"plugin.d.ts",
|
||||
"svg-sprite-loader-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user