A little Typescript help

So the problem here is that there are two ways to return a Date to Coda: as a Number or as a String. At the moment you can’t actually return a Date object, which I understand is confusing. When using a string Coda will try to parse the string value as a date, and when using a number it should be the number of seconds since the epoch. (I’m actually working on adding more documentation about data types this week, so you ran into this problem a few days too soon :slight_smile: )

Unfortunately when there is a mismatch between the type and codaType the error message is extremely unhelpful, talking about booleans for some reason. I’ve already filed a bug about that issue internally and hopefully we can improve it.

7 Likes