Skip to content

Commit c65a91a

Browse files
author
Manu
committed
refactor(types): create types file
1 parent d7d26d8 commit c65a91a

File tree

4 files changed

+25
-10
lines changed

4 files changed

+25
-10
lines changed

release.config.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,19 @@ module.exports = {
88
{ name: 'alpha', prerelease: true }
99
],
1010
plugins: [
11-
'@semantic-release/commit-analyzer',
11+
[
12+
'@semantic-release/commit-analyzer',
13+
{
14+
releaseRules: [
15+
{ type: 'docs', scope: 'README', release: 'patch' },
16+
{ type: 'refactor', release: 'patch' },
17+
{ type: 'style', release: 'patch' }
18+
],
19+
parserOpts: {
20+
noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES']
21+
}
22+
}
23+
],
1224
'@semantic-release/release-notes-generator',
1325
'@semantic-release/changelog',
1426
'@semantic-release/npm',

src/graphqlService.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,7 @@ import {
88
} from '@apollo/client';
99
import { onError } from '@apollo/client/link/error';
1010
import { createUploadLink } from 'apollo-upload-client';
11-
12-
export type DataInitType = {
13-
api: string;
14-
uri: string;
15-
publicUri: string;
16-
};
17-
18-
type ClientFunction = (client: ApolloClient<any>) => void;
11+
import { ClientFunction, DataInitType } from './types';
1912

2013
export class GraphqlService {
2114
_client: any = undefined;

src/types.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { ApolloClient } from '@apollo/client';
2+
3+
export type DataInitType = {
4+
api: string;
5+
uri: string;
6+
publicUri: string;
7+
};
8+
9+
export type ClientFunction = (client: ApolloClient<any>) => void;

test/graphqlService.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { DataInitType, GraphqlService } from '../src/graphqlService';
1+
import { GraphqlService } from '../src/graphqlService';
22
import { ApolloClient, gql } from '../src/index';
3+
import { DataInitType } from '../src/types';
34

45
describe('Test Graphql Service', () => {
56
let instance: GraphqlService;

0 commit comments

Comments
 (0)