Skip to content

Commit 6d6048e

Browse files
committed
Merge branch 'master' of github.com:mgechev/ng2lint
* 'master' of github.com:mgechev/ng2lint: Updating visibility and export to fix d.ts build error
2 parents 4d79933 + db70698 commit 6d6048e

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

src/noAttributeParameterDecoratorRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class Rule extends Lint.Rules.AbstractRule {
1414
' consider construction of type "@Input() %s: string"';
1515

1616

17-
static walkerBuilder = all(
17+
private static walkerBuilder = all(
1818
validate(SyntaxKind.current().Constructor)((node: ts.ConstructorDeclaration) => {
1919
const syntaxKind = SyntaxKind.current();
2020
return Maybe.lift(node.parent)

src/walkerFactory/walkerFactory.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import {IOptions} from 'tslint';
44
import {ComponentMetadata} from '../angular/metadata';
55
import {F1, Maybe} from '../util/function';
66

7-
type Walkable = 'Ng2Component';
7+
// Walkable types
8+
export type Walkable = 'Ng2Component';
89

910
export function allNg2Component(): WalkerBuilder<'Ng2Component'> {
1011
return new Ng2ComponentWalkerBuilder();
@@ -14,7 +15,7 @@ export class Failure {
1415
constructor(public node: ts.Node, public message: string) {}
1516
}
1617

17-
interface WalkerBuilder<T extends Walkable> {
18+
export interface WalkerBuilder<T extends Walkable> {
1819
where: (validate: F1<ComponentMetadata, Maybe<Failure>>) => WalkerBuilder<T>;
1920
build: (sourceFile: ts.SourceFile, options: IOptions) => Ng2Walker;
2021
}

src/walkerFactory/walkerFn.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,17 @@ import {ComponentMetadata} from '../angular/metadata';
55
import {F1, F2, Maybe} from '../util/function';
66
import {Failure} from './walkerFactory';
77

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;
911

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 {
1513
kind: 'Node';
1614
validate: ValidateFn<ts.Node>;
1715
}
1816

19-
interface ComponentValidator {
20-
kind: ComponentWalkable;
17+
export interface ComponentValidator {
18+
kind: 'Ng2Component';
2119
validate: ValidateFn<ComponentMetadata>;
2220
}
2321

0 commit comments

Comments
 (0)