2.0.6 • Published 6 months ago
@types/webpack-blocks__assets v2.0.6
Installation
npm install --save @types/webpack-blocks__assets
Summary
This package contains type definitions for @webpack-blocks/assets (https://github.com/andywer/webpack-blocks/tree/master/packages/assets).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/webpack-blocks__assets.
index.d.ts
// Type definitions for @webpack-blocks/assets 2.0
// Project: https://github.com/andywer/webpack-blocks/tree/master/packages/assets
// Definitions by: Max Boguslavskiy <https://github.com/maxbogus>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.7
import { Block } from 'webpack-blocks';
export namespace css {
type UrlFilter = (url: string, resourcePath: string) => boolean;
type ImportFilter = (parseImport: ParseImportOptions, resourcePath: string) => boolean;
type GetLocalIdent = (context: any, localIdentName: any, localName: any, options: any) => string;
type NameFunction = (file: string) => any;
type PathFunction = (url: string, resourcePath: string, context: string) => any;
interface ParseImportOptions {
url: string;
media: string;
}
interface ModuleOptions {
mode?: string | undefined;
localIdentName?: string | undefined;
context?: string | undefined;
hashPrefix?: string | undefined;
getLocalIdent?: GetLocalIdent | undefined;
localIdentRegExp?: string | RegExp | undefined;
/**
* 0 => no loaders (default);
* 1 => postcss-loader;
* 2 => postcss-loader, sass-loader
*/
importLoaders?: 0 | 1 | 2 | undefined;
localsConvention?: 'asIs' | 'camelCase' | 'camelCaseOnly' | 'dashes' | 'dashesOnly' | undefined;
onlyLocals?: boolean | undefined;
}
interface CssOptions {
url?: boolean | UrlFilter | undefined;
import?: boolean | ImportFilter | undefined;
modules?: boolean | string | ModuleOptions | undefined;
sourceMap?: boolean | undefined;
}
interface FileOptions {
name?: string | NameFunction | undefined;
outputPath?: string | PathFunction | undefined;
publicPath?: string | PathFunction | undefined;
postTransformPublicPath?: ((p: string) => string) | undefined;
context?: string | undefined;
emitFile?: boolean | undefined;
regExp?: RegExp | undefined;
}
interface UrlOptions {
fallback?: string | undefined;
limit?: number | boolean | string | undefined;
mimetype?: string | undefined;
}
function modules(options?: ModuleOptions): any;
}
export function css(options?: css.CssOptions): Block;
export function file(options?: css.FileOptions): Block;
export function url(options?: css.UrlOptions): Block;
Additional Details
- Last updated: Fri, 02 Jul 2021 18:05:23 GMT
- Dependencies: @types/webpack-blocks
- Global values: none
Credits
These definitions were written by Max Boguslavskiy.