Skip to content

Commit

Permalink
Merge pull request #223 from ghsyeung/fix_definition
Browse files Browse the repository at this point in the history
Updating visibility and export to fix d.ts build error
  • Loading branch information
mgechev committed Jan 27, 2017
2 parents 93d406b + c694405 commit db70698
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
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

4 comments on commit db70698

@mlegenhausen
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you already release a beta.5? You have already added so many bug fixes since your last release that are worth getting in the wild.

@mgechev
Copy link
Owner Author

@mgechev mgechev commented on db70698 Feb 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes are mostly refactoring. As next release, I'll try to push more advanced metadata collection with the @angular/compiler.

@mlegenhausen
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only stumbled upon #209. Do you have any approximate timeline?

@mgechev
Copy link
Owner Author

@mgechev mgechev commented on db70698 Feb 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i will try to have something in the next week or two. Currently codelyzer is in a process of massive refactoring/redesign.

Please sign in to comment.