This website requires JavaScript.
Explore
Help
Sign In
fluencelabs
/
assemblyscript
Watch
1
Star
0
Fork
0
You've already forked assemblyscript
mirror of
https://github.com/fluencelabs/assemblyscript
synced
2025-04-26 07:22:21 +00:00
Code
Issues
Projects
Releases
Wiki
Activity
assemblyscript
/
tests
/
parser
/
object-literal.ts.fixture.ts
12 lines
103 B
TypeScript
Raw
Normal View
History
Unescape
Escape
Implement object literal parsing; Instantiate classes from object literals Essentially, if the contextual type is a class with a constructor that takes zero arguments or doesn't have a constructor at all, an object literal can be used to initialize a new instance of that class with preset values.
2018-07-14 04:00:04 +02:00
var
obj
=
{
a
:
123
,
b
:
"234"
,
"c"
:
false
,
d
:
{
a
:
123
,
Support object literal shorthands
2018-07-14 15:18:45 +02:00
"b"
:
{
}
,
c
,
d
:
d
Implement object literal parsing; Instantiate classes from object literals Essentially, if the contextual type is a class with a constructor that takes zero arguments or doesn't have a constructor at all, an object literal can be used to initialize a new instance of that class with preset values.
2018-07-14 04:00:04 +02:00
}
}
;
Reference in New Issue
Copy Permalink