[Pas2js] Class constant with "external" class
warleyalex
warleyalex at yahoo.com.br
Fri Feb 2 20:28:46 CET 2018
Mattias Gaertner wrote
> pas2js 0.9.0 now does the following for external classes:
>
> When a const with expression like
> class const cTemp = '{"page:about2"}';
> or simply
> const cTemp = '{"page:about2"}';
>
> is used, pas2js inserts the value.
>
> While a const without an expression
> const cTemp: string;
> is now treated as a readonly variable.
>
> Which means you can simplify many readonly properties to const.
Can you confirm when we define "class const" field with external class, the
code completion stop worlking :(
type
TBase = class external name 'TBase' (TJSObject)
public
class var cPublic : String;
class const cTemp = '{"info":"telephone")'; // if I comment this line
code completion works as expected!
end;
--
Sent from: http://pas2js.38893.n8.nabble.com/
More information about the Pas2js
mailing list