mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-02 14:38:20 +08:00
Remove test-only dependencies
This commit is contained in:
@@ -1,17 +1,14 @@
|
||||
import { computed } from 'mobx';
|
||||
import { ApolloClient } from 'apollo-client';
|
||||
import gql from 'graphql-tag';
|
||||
|
||||
import query from 'mobx-apollo';
|
||||
|
||||
const PostsQuery = gql`
|
||||
const PostsQuery = `
|
||||
{
|
||||
posts {
|
||||
id
|
||||
title
|
||||
}
|
||||
}
|
||||
`;
|
||||
` as any;
|
||||
|
||||
interface Post {
|
||||
id: string;
|
||||
@@ -19,7 +16,6 @@ interface Post {
|
||||
}
|
||||
|
||||
class PostStore {
|
||||
@computed
|
||||
private get postsQuery() {
|
||||
return query<{ posts: Post[] }>({
|
||||
client: new ApolloClient({
|
||||
@@ -30,7 +26,6 @@ class PostStore {
|
||||
});
|
||||
}
|
||||
|
||||
@computed
|
||||
get posts() {
|
||||
return this.postsQuery.data.posts;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"apollo-client": "^2.0.0",
|
||||
"graphql-tag": "^2.0.0",
|
||||
"mobx": "^3.0.0"
|
||||
"apollo-client": "^2.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
"module": "commonjs",
|
||||
"lib": ["es6"],
|
||||
"target": "es5",
|
||||
"experimentalDecorators": true,
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
|
||||
Reference in New Issue
Block a user