When developing with typescript, e.g. with Angular2, you get an error message similar to this one:
error TS2339: Property 'userLanguage' does not exist on type 'Navigator'.
Check the error message for the correct file and line. Look for a statement like
Currently typescript does not have
userLanguage as a property (tested with typescript up to 2.7.1), although it should already be fixed according to this issue.
You can work around this by simply replacing the statement listed above by
Using this approach, Typescript will simply not check if the attribute is present or not.