/warn

Specifies warning level.

/warn:option

option

The minimum warning level you want displayed for the build. Valid values are 0-4:

Warning level

Meaning

0

Turns off emission of all warning messages; display errors only.

1

Displays errors and severe warning messages.

2

Displays all errors and level 1 warnings plus certain, less-severe warnings, such as warnings about hiding class members.

3

Displays errors, level 1 and 2 warnings, plus certain, less-severe warnings, such as warnings about expressions that always evaluate to true or false.

4

Displays all errors, level 1-3 warnings, plus informational warnings. This is the default warning level at the command line.

The /warn option specifies the warning level for the compiler to display.

Use /warnaserror to treat all warnings as errors up to the warning level specified. Higher-level warnings are ignored.

The compiler always displays errors.

/w is the short form of /warn.

Compile in.js and have the compiler only display level 1 warnings:

jsc /warn:1 in.js
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft