diff --git a/hypertext-application-language/hypertext-application-language-tests.ts b/hypertext-application-language/hypertext-application-language-tests.ts new file mode 100644 index 0000000000..13a88fe870 --- /dev/null +++ b/hypertext-application-language/hypertext-application-language-tests.ts @@ -0,0 +1,20 @@ +/// + +// Link object + +// Fields format: +var link:Hal.Link = { + "deprecation": "", + "href": "", + "hreflang": "", + "name": "", + "profile": "", + "templated": true, + "title": "", + "type": "", +}; + +// Required fields: +var link:Hal.Link = { + "href": "", +}; diff --git a/hypertext-application-language/hypertext-application-language.d.ts b/hypertext-application-language/hypertext-application-language.d.ts new file mode 100644 index 0000000000..648a89634d --- /dev/null +++ b/hypertext-application-language/hypertext-application-language.d.ts @@ -0,0 +1,22 @@ +// Type definitions for Hypertext Application Language Draft 6 +// Project: https://tools.ietf.org/html/draft-kelly-json-hal-06 +// Definitions by: Maks3w +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module Hal { + /** + * Describe a HAL Link object + * + * https://tools.ietf.org/html/draft-kelly-json-hal-06#section-5 + */ + interface Link { + deprecation?: string; + href: string; + hreflang?: string; + name?: string; + profile?: string; + templated?: boolean; + title?: string; + type?: string; + } +}