mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-04 16:02:50 +00:00
new package: center-align (#34203)
* npx dts-gen -m center-align --dt * drafted types for center-align * npx prettier --write .\types\center-align\** * fixed linting issues
This commit is contained in:
parent
3b226ddd59
commit
964c481dfd
17
types/center-align/center-align-tests.ts
Normal file
17
types/center-align/center-align-tests.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import center from "center-align";
|
||||
|
||||
// multi-line sample
|
||||
center([
|
||||
"Lorem ipsum dolor sit amet,",
|
||||
"consectetur adipiscing",
|
||||
"elit, sed do eiusmod tempor incididunt",
|
||||
"ut labore et dolore",
|
||||
"magna aliqua. Ut enim ad minim",
|
||||
"veniam, quis"
|
||||
]);
|
||||
|
||||
// single-line samples
|
||||
center("foo"); // => 'foo' (does nothing)
|
||||
center("foo", 12); // => ' foo '
|
||||
center("foo", 10); // => ' foo '
|
||||
center("foo", 8); // => ' foo '
|
||||
10
types/center-align/index.d.ts
vendored
Normal file
10
types/center-align/index.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// Type definitions for center-align 1.0
|
||||
// Project: https://github.com/jonschlinkert/center-align
|
||||
// Definitions by: Claas Ahlrichs <https://github.com/claasahl>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.7
|
||||
|
||||
declare function center_align(val: string, width?: number): string;
|
||||
declare function center_align(val: string[], width?: number): string[];
|
||||
|
||||
export = center_align;
|
||||
17
types/center-align/tsconfig.json
Normal file
17
types/center-align/tsconfig.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": ["es6"],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": ["../"],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"esModuleInterop": true
|
||||
},
|
||||
"files": ["index.d.ts", "center-align-tests.ts"]
|
||||
}
|
||||
1
types/center-align/tslint.json
Normal file
1
types/center-align/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user