|
Re: Javascript Editor Type Validation [message #665865 is a reply to message #665843] |
Sun, 17 April 2011 13:59 |
|
Matt,
This is not a bug, this is the way the JavaScript type inferencing is currently designed. The two most common ways we determine if something is a type is if we detect the following syntax:
function foo() {
this.bar = "test" <----the reference to 'this' tips us off this is a type and not just a function
}
function foo() {}
foo.prototype.myFunc = function() {} <-- the use of prototype tips us off this is a type.
Just having 'function foo() {}' just looks like a function to us and there is no information there hinting this could be a type.
My suggestion to you, if you do not want to see the validation message any more, would be to use one of the two syntaxes above or turn off the validation.
If you have any other further questions please do not hesitate to ask.
Blue Skies,
~Ian
Ian Tewksbury
WTP JavaScript Tools
IBM Rational
-----
“When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return.” ~Leonardo da Vinci
|
|
|
|
Powered by
FUDForum. Page generated in 0.03202 seconds