Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating visibility and export to fix d.ts build error #223

Merged
merged 1 commit into from
Jan 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/noAttributeParameterDecoratorRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class Rule extends Lint.Rules.AbstractRule {
' consider construction of type "@Input() %s: string"';


static walkerBuilder = all(
private static walkerBuilder = all(
validate(SyntaxKind.current().Constructor)((node: ts.ConstructorDeclaration) => {
const syntaxKind = SyntaxKind.current();
return Maybe.lift(node.parent)
Expand Down
5 changes: 3 additions & 2 deletions src/walkerFactory/walkerFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import {IOptions} from 'tslint';
import {ComponentMetadata} from '../angular/metadata';
import {F1, Maybe} from '../util/function';

type Walkable = 'Ng2Component';
// Walkable types
export type Walkable = 'Ng2Component';

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

interface WalkerBuilder<T extends Walkable> {
export interface WalkerBuilder<T extends Walkable> {
where: (validate: F1<ComponentMetadata, Maybe<Failure>>) => WalkerBuilder<T>;
build: (sourceFile: ts.SourceFile, options: IOptions) => Ng2Walker;
}
Expand Down
14 changes: 6 additions & 8 deletions src/walkerFactory/walkerFn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,17 @@ import {ComponentMetadata} from '../angular/metadata';
import {F1, F2, Maybe} from '../util/function';
import {Failure} from './walkerFactory';

type ComponentWalkable = 'Ng2Component';
export type Validator = NodeValidator | ComponentValidator;
export type ValidateFn<T> = F2<T, IOptions, Maybe<Failure[]>>;
export type WalkerOptions = any;

type Validator = NodeValidator | ComponentValidator;
type ValidateFn<T> = F2<T, IOptions, Maybe<Failure[]>>;
type WalkerOptions = any;

interface NodeValidator {
export interface NodeValidator {
kind: 'Node';
validate: ValidateFn<ts.Node>;
}

interface ComponentValidator {
kind: ComponentWalkable;
export interface ComponentValidator {
kind: 'Ng2Component';
validate: ValidateFn<ComponentMetadata>;
}

Expand Down