JS1199: Syntax error. Write 'function identifier(...) : Type{' rather than 'Type identifier(...){' to declare a typed function

The code has what appears to be a C-style method declaration of the form Type identifier(...). To declare a method in JScript, use the function identifier(...) : Type syntax.

To correct this error

  • Declare methods using the function identifier(...) : Type syntax.

See Also

Concepts

Troubleshooting Your Scripts

Reference

function Statement

Other Resources

JScript Reference

Class-based Objects