Skip to content

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

@paullauyc

Description

@paullauyc

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions