Skip to content
This repository was archived by the owner on Feb 4, 2018. It is now read-only.

Commit b87de5d

Browse files
author
blond
committed
chore(typings): move types to types dir
1 parent 86e59d2 commit b87de5d

File tree

5 files changed

+46
-36
lines changed

5 files changed

+46
-36
lines changed

index.d.ts

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,3 @@
1-
import './globals.d';
2-
3-
declare class BemEntityName {
4-
constructor(obj: BEMSDK.EntityName.Options);
5-
6-
readonly block: BEMSDK.EntityName.BlockName;
7-
readonly elem: BEMSDK.EntityName.ElementName | undefined;
8-
readonly mod: BEMSDK.EntityName.Modifier | undefined;
9-
readonly modName: BEMSDK.EntityName.ModifierName | undefined;
10-
readonly modVal: BEMSDK.EntityName.ModifierValue | undefined;
11-
readonly type: BEMSDK.EntityName.Type;
12-
readonly scope: BemEntityName | null;
13-
readonly id: BEMSDK.EntityName.Id;
14-
15-
isSimpleMod(): boolean | null;
16-
isEqual(entityName: BemEntityName): boolean;
17-
belongsTo(entityName: BemEntityName): boolean;
18-
valueOf(): BEMSDK.EntityName.Representation;
19-
toJSON(): BEMSDK.EntityName.Representation;
20-
toString(): string;
21-
inspect(depth: number, options: object): string;
22-
23-
static create(obj: BEMSDK.EntityName.CreateOptions | string): BemEntityName;
24-
static isBemEntityName(entityName: any): boolean;
25-
}
1+
import BemEntityName from './types/entity-name.d';
262

273
export = BemEntityName;

jsconfig.json

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
{
2-
"compilerOptions": {
3-
"target": "ES6",
4-
"module": "commonjs"
5-
},
6-
"files": [
7-
"index.js",
8-
"index.d.ts"
9-
]
2+
"compilerOptions": {
3+
"target": "ES6",
4+
"module": "commonjs"
5+
},
6+
"include": [
7+
"lib",
8+
"types"
9+
],
10+
"exclude": [
11+
"node_modules"
12+
],
13+
"files": [
14+
"index.js",
15+
"index.d.ts"
16+
]
1017
}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
"typings": "index.d.ts",
2626
"files": [
2727
"lib/**",
28+
"types/**",
2829
"index.js",
29-
"index.d.ts",
30-
"globals.d.ts"
30+
"index.d.ts"
3131
],
3232
"engines": {
3333
"node": ">= 4.0"
@@ -56,7 +56,7 @@
5656
"test": "nyc ava",
5757
"lint": "npm run lint:js && npm run lint:dts",
5858
"lint:js": "eslint .",
59-
"lint:dts": "tslint **.d.ts",
59+
"lint:dts": "tslint types/*.d.ts",
6060
"coveralls": "nyc report --reporter=text-lcov | coveralls"
6161
},
6262
"ava": {

types/entity-name.d.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import './globals.d';
2+
3+
declare class BemEntityName {
4+
constructor(obj: BEMSDK.EntityName.Options);
5+
6+
readonly block: BEMSDK.EntityName.BlockName;
7+
readonly elem: BEMSDK.EntityName.ElementName | undefined;
8+
readonly mod: BEMSDK.EntityName.Modifier | undefined;
9+
readonly modName: BEMSDK.EntityName.ModifierName | undefined;
10+
readonly modVal: BEMSDK.EntityName.ModifierValue | undefined;
11+
readonly type: BEMSDK.EntityName.Type;
12+
readonly scope: BemEntityName | null;
13+
readonly id: BEMSDK.EntityName.Id;
14+
15+
isSimpleMod(): boolean | null;
16+
isEqual(entityName: BemEntityName): boolean;
17+
belongsTo(entityName: BemEntityName): boolean;
18+
valueOf(): BEMSDK.EntityName.Representation;
19+
toJSON(): BEMSDK.EntityName.Representation;
20+
toString(): string;
21+
inspect(depth: number, options: object): string;
22+
23+
static create(obj: BEMSDK.EntityName.CreateOptions | string): BemEntityName;
24+
static isBemEntityName(entityName: any): boolean;
25+
}
26+
27+
export = BemEntityName;
File renamed without changes.

0 commit comments

Comments
 (0)