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

Type script can't indent while the program include the type casting statement #18

Open
paullauyc opened this issue Jun 26, 2020 · 0 comments

Comments

@paullauyc
Copy link

paullauyc commented Jun 26, 2020

call indent.js BEFORE

constructor(data?: ITest) {
    if (data) {
        for (let property in data) {
            if (data.hasOwnProperty(property))
                (<any>this)[property] = (<any>data)[property];
        }
    }
    if (!data) {
        this.id = -1;
    }
}

call indent.js AFTER

constructor(data?: ITest) {
	if (data) {
		for (let property in data) {
			if (data.hasOwnProperty(property))
				(<any>this)[property] = (<any>data)[property];
					}
					}
					if (!data) {
						this.id = -1;
					}
					}

I think indent.js can't recognize the or statements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant