File tree 3 files changed +10
-11
lines changed
3 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export class Rule extends Lint.Rules.AbstractRule {
14
14
' consider construction of type "@Input() %s: string"' ;
15
15
16
16
17
- static walkerBuilder = all (
17
+ private static walkerBuilder = all (
18
18
validate ( SyntaxKind . current ( ) . Constructor ) ( ( node : ts . ConstructorDeclaration ) => {
19
19
const syntaxKind = SyntaxKind . current ( ) ;
20
20
return Maybe . lift ( node . parent )
Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ import {IOptions} from 'tslint';
4
4
import { ComponentMetadata } from '../angular/metadata' ;
5
5
import { F1 , Maybe } from '../util/function' ;
6
6
7
- type Walkable = 'Ng2Component' ;
7
+ // Walkable types
8
+ export type Walkable = 'Ng2Component' ;
8
9
9
10
export function allNg2Component ( ) : WalkerBuilder < 'Ng2Component' > {
10
11
return new Ng2ComponentWalkerBuilder ( ) ;
@@ -14,7 +15,7 @@ export class Failure {
14
15
constructor ( public node : ts . Node , public message : string ) { }
15
16
}
16
17
17
- interface WalkerBuilder < T extends Walkable > {
18
+ export interface WalkerBuilder < T extends Walkable > {
18
19
where : ( validate : F1 < ComponentMetadata , Maybe < Failure > > ) => WalkerBuilder < T > ;
19
20
build : ( sourceFile : ts . SourceFile , options : IOptions ) => Ng2Walker ;
20
21
}
Original file line number Diff line number Diff line change @@ -5,19 +5,17 @@ import {ComponentMetadata} from '../angular/metadata';
5
5
import { F1 , F2 , Maybe } from '../util/function' ;
6
6
import { Failure } from './walkerFactory' ;
7
7
8
- type ComponentWalkable = 'Ng2Component' ;
8
+ export type Validator = NodeValidator | ComponentValidator ;
9
+ export type ValidateFn < T > = F2 < T , IOptions , Maybe < Failure [ ] > > ;
10
+ export type WalkerOptions = any ;
9
11
10
- type Validator = NodeValidator | ComponentValidator ;
11
- type ValidateFn < T > = F2 < T , IOptions , Maybe < Failure [ ] > > ;
12
- type WalkerOptions = any ;
13
-
14
- interface NodeValidator {
12
+ export interface NodeValidator {
15
13
kind : 'Node' ;
16
14
validate : ValidateFn < ts . Node > ;
17
15
}
18
16
19
- interface ComponentValidator {
20
- kind : ComponentWalkable ;
17
+ export interface ComponentValidator {
18
+ kind : 'Ng2Component' ;
21
19
validate : ValidateFn < ComponentMetadata > ;
22
20
}
23
21
You can’t perform that action at this time.
0 commit comments