mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-17 07:20:23 +00:00
added definitions for contentful-resolve-response
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
/// <reference path="contentful-resolve-response.d.ts" />
|
||||
import resolveResponse = require('contentful-resolve-response');
|
||||
|
||||
var response = {
|
||||
items: [
|
||||
{
|
||||
someValue: 'wow',
|
||||
someLink: {sys: {type: 'Link', linkType: 'Entry', id: 'suchId'}}
|
||||
}
|
||||
],
|
||||
includes: {
|
||||
Entry: [
|
||||
{sys: {type: 'Entry', id: 'suchId'}, very: 'doge'}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
var items = resolveResponse(response)
|
||||
|
||||
console.log(items);
|
||||
@@ -0,0 +1,9 @@
|
||||
// Type definitions for contentful-resolve-response
|
||||
// Project: https://github.com/contentful/contentful-resolve-response
|
||||
// Definitions by: Anton Karsten <https://github.com/antonkarsten>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare module 'contentful-resolve-response' {
|
||||
function resolveResponse(response: any): any;
|
||||
export = resolveResponse;
|
||||
}
|
||||
Reference in New Issue
Block a user