Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Enhance skygear cloud type definition #9

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

limouren
Copy link
Contributor

@limouren limouren commented Mar 4, 2019

I can feel the needs to add ci that tests the definition in a server tsconfig.

body?: string;
}

interface ResultJSON {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unused in this commit.

index.d.ts Outdated

toResultJSON(): { [key: string]: any };
}
namespace SkygearResponse {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a fan of namespace so I prefer interface SkygearResponseOptions

@@ -489,6 +489,9 @@ declare module "skygear" {
}

declare module "skygear/cloud" {
import { Fields, Files } from "formidable";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that the definition is small enough that we can copy instead.
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/formidable/index.d.ts#L32

I would like to reduce the number of dependencies.

],
"dependencies": {
"@types/formidable": "*",
"@types/node": "*"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can avoid @types/formidable but not @types/node. Maybe we should mark @types/node as peer dependency and add it to devDependencies so that we still can reference it in our test.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants