spencermountain / spacetime

A lightweight javascript timezone library
http://spacetime.how/
Other
3.98k stars 184 forks source link

dayOfYear method missing in typescript #333

Closed ansf closed 2 years ago

ansf commented 2 years ago

Using version 7.1.2, the following code does not compile in typescript:

import spacetime from 'spacetime'
const today = spacetime().dayOfYear()

error is:

error TS2339: Property 'dayOfYear' does not exist on type 'Spacetime'.

According to https://observablehq.com/@spencermountain/spacetime-api, this method should exist.

Am I doing something wrong, or this is method missing in the types?

spencermountain commented 2 years ago

good catch! yep, missing from the types. fixed on dev, will add this to the next release. thanks

spencermountain commented 2 years ago

released as 7.1.3 cheers