mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
Fix definition for convert-layout (#20355)
* Add types for convert-layout ( https://github.com/ai/convert-layout ) * Add missed layouts, fix tsc warnings * Fix tslint and common mistakes * Simplify definition structure for convert-layout
This commit is contained in:
Vendored
-2
@@ -1,2 +0,0 @@
|
||||
import { layout } from './index';
|
||||
export const by: layout;
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ru } from 'convert-layout/ru';
|
||||
import { ru } from 'convert-layout';
|
||||
|
||||
const s = 'Lorem ipsum dolor sit amet.';
|
||||
let result = ru.toEn(s);
|
||||
|
||||
Vendored
-2
@@ -1,2 +0,0 @@
|
||||
import { layout } from './index';
|
||||
export const de: layout;
|
||||
Vendored
-2
@@ -1,2 +0,0 @@
|
||||
import { layout } from './index';
|
||||
export const es: layout;
|
||||
Vendored
-2
@@ -1,2 +0,0 @@
|
||||
import { layout } from './index';
|
||||
export const he: layout;
|
||||
Vendored
+45
-2
@@ -3,9 +3,52 @@
|
||||
// Definitions by: Mikhail Aksenov <https://github.com/xeningem>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
export const layouts: { [id: string]: layout };
|
||||
declare var layouts: { [id: string]: layout };
|
||||
declare var lang_layout: layout;
|
||||
|
||||
export interface layout {
|
||||
declare const convert_layout: {
|
||||
by: layout;
|
||||
de: layout;
|
||||
es: layout;
|
||||
he: layout;
|
||||
kk: layout;
|
||||
ru: layout;
|
||||
uk: layout;
|
||||
};
|
||||
|
||||
declare module "convert-layout" {
|
||||
export = convert_layout;
|
||||
}
|
||||
|
||||
declare module "convert-layout/by" {
|
||||
export = lang_layout;
|
||||
}
|
||||
|
||||
declare module "convert-layout/de" {
|
||||
export = lang_layout;
|
||||
}
|
||||
|
||||
declare module "convert-layout/es" {
|
||||
export = lang_layout;
|
||||
}
|
||||
|
||||
declare module "convert-layout/he" {
|
||||
export = lang_layout;
|
||||
}
|
||||
|
||||
declare module "convert-layout/kk" {
|
||||
export = lang_layout;
|
||||
}
|
||||
|
||||
declare module "convert-layout/ru" {
|
||||
export = lang_layout;
|
||||
}
|
||||
|
||||
declare module "convert-layout/uk" {
|
||||
export = lang_layout;
|
||||
}
|
||||
|
||||
interface layout {
|
||||
toEn(s: string): string;
|
||||
fromEn(s: string): string;
|
||||
}
|
||||
|
||||
Vendored
-2
@@ -1,2 +0,0 @@
|
||||
import { layout } from './index';
|
||||
export const kk: layout;
|
||||
Vendored
-2
@@ -1,2 +0,0 @@
|
||||
import { layout } from './index';
|
||||
export const ru: layout;
|
||||
@@ -18,13 +18,6 @@
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"by.d.ts",
|
||||
"de.d.ts",
|
||||
"es.d.ts",
|
||||
"he.d.ts",
|
||||
"kk.d.ts",
|
||||
"ru.d.ts",
|
||||
"uk.d.ts",
|
||||
"convert-layout-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1 +1,6 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
"no-declare-current-package": false
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
-2
@@ -1,2 +0,0 @@
|
||||
import { layout } from './index';
|
||||
export const uk: layout;
|
||||
Reference in New Issue
Block a user