Browse Source

ref: convert sentryAppToken.js to typescript (#55076)

<!-- Describe your PR here. -->
Michelle Zhang 1 year ago
parent
commit
a0652d9d7c
1 changed files with 8 additions and 2 deletions
  1. 8 2
      fixtures/js-stubs/sentryAppToken.tsx

+ 8 - 2
fixtures/js-stubs/sentryAppToken.js → fixtures/js-stubs/sentryAppToken.tsx

@@ -1,11 +1,17 @@
-export function SentryAppToken(params = {}) {
+import {InternalAppApiToken} from 'sentry/types';
+
+export function SentryAppToken(
+  params: Partial<InternalAppApiToken> = {}
+): InternalAppApiToken {
   return {
     token: '123456123456123456123456-token',
     dateCreated: '2019-03-02T18:30:26Z',
     scopes: [],
     refreshToken: '123456123456123456123456-refreshtoken',
-    expiresAt: null,
+    expiresAt: '',
     application: null,
+    id: '1',
+    state: 'active',
     ...params,
   };
 }