Skip to content

readonly modifier throws errors during compilation #400

@RoxKilly

Description

@RoxKilly

Expected behavior:
Valid typescript syntax should not raise errors during compilation.

Actual behavior:
The readonly modifier causes compilation errors. Eg, this line:

readonly change: Observable<MdButtonToggleChange>;

Throws the following errors during compilation:

error TS1005: '=' expected.
error TS1005: ';' expected.
error TS1005: '(' expected.

The typescript compiler (typescript 2.0.2) does not throw errors

Your gulpfile:

gulp.task('build-ts', function () {
    return gulp.src(appDev + '**/*.ts')
        .pipe(sourcemaps.init())
        .pipe(typescript(tsProject))
        .pipe(sourcemaps.write('.',{
            sourceMappingURL: function(file) {
                return host + '/' + appProd + file.relative + '.map';
            }
        }))
        .pipe(gulp.dest(appProd));
});

The app runs fine despite these errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions