Giter Site home page Giter Site logo

ustudiocompany / ts4ocds Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 0.0 9.5 MB

๐Ÿ—ƒ๏ธ TypeScript Typization for OCDS

Home Page: https://ustudiocompany.github.io/ts4ocds/

License: MIT License

TypeScript 95.06% JavaScript 2.95% CSS 1.99%
types typescript ocds declarations ts

ts4ocds's People

Contributors

drizzer14 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ts4ocds's Issues

[FEAT] (Period) Make Period a discriminated union

Period should correspond to the following declaration:

export type Period = PeriodInDays | PeriodConstrained;

interface PeriodBase {
  /**
   * The duration of the period reflected in ISO format.
   */
  duration: string;
  /**
   * The maximum duration of this period in days.
   * Where a start and end date are given, this field is optional,
   * and should reflect the difference between those two days.
   */
  durationInDays?: number;
  /**
   * The start date for the period.
   */
  startDate?: string;
  /**
   * The end date for the period.
   */
  endDate?: string;
  /**
   * The period cannot be extended beyond this date.
   */
  maxExtentDate?: string;
}

interface PeriodInDays extends PeriodBase {
  startDate?: never;
  endDate?: never;
  durationInDays: number;
}

interface PeriodConstrained extends PeriodBase {
  startDate: string;
  endDate: string;
  durationInDays?: number;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.