mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Added type for html-webpack-tags-plugin (#39286)
* commented plugin * corrected test name * corrected test name
This commit is contained in:
parent
f24547c4f9
commit
e47ab14b90
@ -0,0 +1,19 @@
|
||||
import HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
import * as tags from 'html-webpack-tags-plugin';
|
||||
|
||||
const optionsArray: tags.Options[] = [
|
||||
{
|
||||
tags: 'tag'
|
||||
},
|
||||
{
|
||||
tags: ['tags', 'hugs'],
|
||||
files: 'readme.txt'
|
||||
},
|
||||
{
|
||||
tags: ['tags', 'hugs'],
|
||||
files: 'readme.txt',
|
||||
append: true
|
||||
}
|
||||
];
|
||||
|
||||
const plugins: HtmlWebpackPlugin[] = optionsArray.map(options => new HtmlWebpackPlugin(options));
|
||||
22
types/html-webpack-tags-plugin/index.d.ts
vendored
Normal file
22
types/html-webpack-tags-plugin/index.d.ts
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
// Type definitions for html-webpack-tags-plugin 2.0
|
||||
// Project: https://github.com/jharris4/html-webpack-tags-plugin
|
||||
// Definitions by: Vladimir Grenaderov <https://github.com/VladimirGrenaderov>
|
||||
// Max Boguslavskiy <https://github.com/maxbogus>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
import { Plugin } from 'webpack';
|
||||
|
||||
declare namespace HtmlWebpackTagsPlugin {
|
||||
interface Options {
|
||||
tags: string | string[];
|
||||
files?: string | string[];
|
||||
append?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
declare class HtmlWebpackTagsPlugin extends Plugin {
|
||||
constructor(options: HtmlWebpackTagsPlugin.Options);
|
||||
}
|
||||
|
||||
export = HtmlWebpackTagsPlugin;
|
||||
23
types/html-webpack-tags-plugin/tsconfig.json
Normal file
23
types/html-webpack-tags-plugin/tsconfig.json
Normal file
@ -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",
|
||||
"html-webpack-tags-plugin-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/html-webpack-tags-plugin/tslint.json
Normal file
1
types/html-webpack-tags-plugin/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user