From 3285349f9dab8321152de7b6eed7a38938e634cf Mon Sep 17 00:00:00 2001 From: Maks3w Date: Sun, 19 Apr 2015 19:46:18 +0200 Subject: [PATCH 1/2] [HAL] Link object https://tools.ietf.org/html/draft-kelly-json-hal-06#section-5 --- hal/hal-tests.ts | 20 ++++++++++++++++++++ hal/hal.d.ts | 22 ++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 hal/hal-tests.ts create mode 100644 hal/hal.d.ts diff --git a/hal/hal-tests.ts b/hal/hal-tests.ts new file mode 100644 index 0000000000..1a8e9a4a6d --- /dev/null +++ b/hal/hal-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/hal/hal.d.ts b/hal/hal.d.ts new file mode 100644 index 0000000000..648a89634d --- /dev/null +++ b/hal/hal.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; + } +} From e470338457fedabe0f72f3e4b77d18c4de8a181d Mon Sep 17 00:00:00 2001 From: Maks3w Date: Tue, 21 Apr 2015 10:58:20 +0200 Subject: [PATCH 2/2] Rename hal > hypertext-application-language --- .../hypertext-application-language-tests.ts | 2 +- .../hypertext-application-language.d.ts | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename hal/hal-tests.ts => hypertext-application-language/hypertext-application-language-tests.ts (76%) rename hal/hal.d.ts => hypertext-application-language/hypertext-application-language.d.ts (100%) diff --git a/hal/hal-tests.ts b/hypertext-application-language/hypertext-application-language-tests.ts similarity index 76% rename from hal/hal-tests.ts rename to hypertext-application-language/hypertext-application-language-tests.ts index 1a8e9a4a6d..13a88fe870 100644 --- a/hal/hal-tests.ts +++ b/hypertext-application-language/hypertext-application-language-tests.ts @@ -1,4 +1,4 @@ -/// +/// // Link object diff --git a/hal/hal.d.ts b/hypertext-application-language/hypertext-application-language.d.ts similarity index 100% rename from hal/hal.d.ts rename to hypertext-application-language/hypertext-application-language.d.ts