Difference between type[] (array) and [type] (tuple)

  • [string] denotes a tuple with exactly one string element. Tuples are ordered lists of items, finite and usually fixed sized.
  • string[] denotes an array of strings. Arrays will have variable size, including even a size of zero.

The correct usage of the Tuple in your case would be:

let type2:WithStringArray2 = {
    property: ['someString']
};

See Documentation

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)