Skip to content

Commit 3e672a0

Browse files
committed
Fix issue #45
1 parent ab83a8b commit 3e672a0

File tree

9 files changed

+27
-113
lines changed

9 files changed

+27
-113
lines changed

.nycrc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"all": true,
3+
"lines": 100,
4+
"branches": 100,
5+
"functions": 100,
6+
"extension": [
7+
".ts"
8+
],
9+
"include": "src",
10+
"exclude": [
11+
"**/*-interface.ts",
12+
"**/*-options.ts"
13+
],
14+
"reporter": [
15+
"text-summary",
16+
"html"
17+
],
18+
"require": [
19+
"ts-node/register/type-check"
20+
]
21+
}

package.json

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -81,22 +81,5 @@
8181
"tokenizer": "1.1.x",
8282
"ts-node": "^4.1.0",
8383
"typescript": "^2.6.2"
84-
},
85-
"nyc": {
86-
"all": true,
87-
"lines": 100,
88-
"branches": 100,
89-
"functions": 100,
90-
"extension": [
91-
".ts"
92-
],
93-
"include": "src",
94-
"reporter": [
95-
"text-summary",
96-
"html"
97-
],
98-
"require": [
99-
"ts-node/register/type-check"
100-
]
10184
}
10285
}

src/environment-options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
*/
3333
import TwingCacheInterface from "./cache-interface";
3434

35-
interface TwingEnvironmentOptions {
35+
type TwingEnvironmentOptions = {
3636
debug?: boolean;
3737
charset?: string;
3838
base_template_class?: string;

src/filter-options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import TwingFilter from "./filter";
22

3-
interface TwingFilterOptions {
3+
type TwingFilterOptions = {
44
needs_environment?: boolean;
55
needs_context?: boolean;
66
is_variadic?: boolean;

src/function-options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
interface TwingFunctionOptions {
1+
type TwingFunctionOptions = {
22
needs_environment?: boolean;
33
needs_context?: boolean;
44
is_variadic?: boolean;

src/token.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import Position from "./token-position";
1+
import TokenPosition from "./token-position";
22
import TwingTokenType from "./token-type";
33

44
class TwingToken {
5-
position: Position;
5+
position: TokenPosition;
66
type: TwingTokenType;
77
value: string;
88
lineno: number;
99

1010
constructor(type: TwingTokenType, value: string, lineno: number) {
11-
this.position = new Position;
11+
this.position = new TokenPosition;
1212
this.type = type;
1313
this.value = value;
1414
this.lineno = lineno;

test/environment-stub.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import TwingEnvironment from "../src/environment";
2-
import TwingTestLoaderStub from "./loader-stub";
32
import TwingEnvironmentOptions from "../src/environment-options";
43
import TwingLoaderInterface from "../src/loader-interface";
54

test/node-test-case.ts

Lines changed: 0 additions & 79 deletions
This file was deleted.

test/template-stub.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)