mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Merge pull request #18195 from Rokt33r/filenamify
Add typings for filenamify
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import * as filenamify from 'filenamify';
|
||||
|
||||
filenamify('<foo/bar>');
|
||||
// => 'foo!bar'
|
||||
|
||||
filenamify('foo:"bar"', {replacement: '🐴'});
|
||||
// => 'foo🐴bar'
|
||||
|
||||
filenamify.path('/some/!path');
|
||||
// => '/some/path'
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
// Type definitions for filenamify 2.0
|
||||
// Project: https://github.com/sindresorhus/filenamify
|
||||
// Definitions by: Junyoung Choi <https://github.com/rokt33r>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare function filenamify(input: string, options?: filenamify.Options): string;
|
||||
|
||||
declare namespace filenamify {
|
||||
interface Options {
|
||||
replacement: string;
|
||||
}
|
||||
function path(input: string, options?: filenamify.Options): string;
|
||||
}
|
||||
|
||||
export = filenamify;
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"filenamify-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Reference in New Issue
Block a user