Skip to content

Instantly share code, notes, and snippets.

@chaliy
Created May 6, 2010 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chaliy/392306 to your computer and use it in GitHub Desktop.
Save chaliy/392306 to your computer and use it in GitHub Desktop.
type Order = {
Number : string
Date : DateTime
Items : {
ProductSKU : string
Quantity : int
} list
}
@COTOHA
Copy link

COTOHA commented May 6, 2010

а нафига? и как ты будешь инитить анонимные внутренние типы?

let order = new Order ("a", DateTime.now(), new (???))
или

let order = new Order () //допустим
order.Items <- ???

update:
для records оно покатит (они там вроде по структуре матчатся),
let order = { Number=1; Date=DateTime.now(); Items = [ {ProductSKU="a"; Quantity=1} , ... ] }

а что с классами делать?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment