Skip to content

Commit

Permalink
Split types into separate files
Browse files Browse the repository at this point in the history
  • Loading branch information
targendaz2 committed Apr 22, 2024
1 parent ebcd166 commit 13fafd4
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 31 deletions.
3 changes: 3 additions & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from './infoPlist';
export * from './jxa';
export * from './msda';
24 changes: 24 additions & 0 deletions src/types/infoPlist.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
export type DocumentType = {
CFBundleTypeExtensions?: string[];
CFBundleTypeMIMETypes?: string[];
CFBundleTypeRole:
| 'Editor'
| 'Viewer'
| 'Shell'
| 'QLGenerator'
| 'None'
| 'All';
};

export type UTIType = {
CFBundleURLSchemes: string[];
};

export type InfoPlist = {
CFBundleDisplayName: string;
CFBundleDocumentTypes?: DocumentType[];
CFBundleIdentifier: string;
CFBundleName: string;
CFBundleShortVersionString: string;
CFBundleURLTypes?: UTIType[];
};
5 changes: 5 additions & 0 deletions src/types/jxa.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import '@jxa/global-type';

export type JXAApplication = typeof Application &
Application._StandardAdditions &
Application.AnyValue;
31 changes: 0 additions & 31 deletions src/types.ts → src/types/msda.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,3 @@
import '@jxa/global-type';

export type DocumentType = {
CFBundleTypeExtensions?: string[];
CFBundleTypeMIMETypes?: string[];
CFBundleTypeRole:
| 'Editor'
| 'Viewer'
| 'Shell'
| 'QLGenerator'
| 'None'
| 'All';
};

export type UTLType = {
CFBundleURLSchemes: string[];
};

export type InfoPlist = {
CFBundleDisplayName: string;
CFBundleDocumentTypes?: DocumentType[];
CFBundleIdentifier: string;
CFBundleName: string;
CFBundleShortVersionString: string;
CFBundleURLTypes?: UTLType[];
};

export type JXAApplication = typeof Application &
Application._StandardAdditions &
Application.AnyValue;

export type UTIRole = 'Viewer' | 'Shell' | 'QLGenerator' | 'None' | 'All';

export type DefaultApp = {
Expand Down

0 comments on commit 13fafd4

Please sign in to comment.