Skip to content

Commit

Permalink
🏷️ global import common types #56
Browse files Browse the repository at this point in the history
  • Loading branch information
trydofor committed Oct 17, 2024
1 parent d757d3b commit cc5e9a3
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 11 deletions.
6 changes: 6 additions & 0 deletions .changeset/large-bottles-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@fessional/razor-common": patch
"@fessional/razor-mobile": patch
---

🏷️ global import common types #56
3 changes: 0 additions & 3 deletions layers/common/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,5 @@ export default defineNuxtConfig({
},
typescript: {
typeCheck: true,
tsConfig: {
include: ['./types/*'],
},
},
});
2 changes: 1 addition & 1 deletion layers/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
"@vueuse/nuxt": "catalog:common",
"vue": "catalog:common"
}
}
}
1 change: 0 additions & 1 deletion layers/common/test/typed-fetching.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { describe, it, expect, vi } from 'vitest';
import { fetchingData, fetchingDataAsync } from '../utils/typed-fetching';
import type { DataResult } from '../types/common';

describe('fetchingData', () => {
it('should call loading with true and false', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export interface DataResult<T> {
interface DataResult<T> {
success: boolean;
data?: T;
message?: string;
Expand Down
4 changes: 1 addition & 3 deletions layers/common/utils/typed-fetching.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { DataResult } from '../types/common';

export type TypedFetchingOptions = {
export type TypedFetchingOptions = {
/**
* @param status - true if loading, false if done
*/
Expand Down
1 change: 0 additions & 1 deletion layers/mobile/test/ionic-fetching.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { loadingController, alertController } from '@ionic/vue';
import { ionicFetchingDataAsync } from '../utils/ionic-fetching';
import type { DataResult } from '~razor-common/types/common';

// Mocking Ionic controllers
vi.mock('@ionic/vue', () => ({
Expand Down
1 change: 0 additions & 1 deletion layers/mobile/utils/ionic-fetching.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { loadingController, alertController } from '@ionic/vue';
import type { DataResult } from '~razor-common/types/common';
import { fetchingResultAsync } from '~razor-common/utils/typed-fetching';

function _failure(message?: string, code?: string) {
Expand Down

0 comments on commit cc5e9a3

Please sign in to comment.