Просмотр исходного кода

improve type for PlatformIntegration (#32898)

Stephen Cefali 3 лет назад
Родитель
Сommit
16e055cab7
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      static/app/data/platforms.tsx
  2. 1 1
      static/app/types/project.tsx

+ 1 - 1
static/app/data/platforms.tsx

@@ -22,7 +22,7 @@ export default ([] as PlatformIntegration[]).concat(
   [],
   ...[...platforms.platforms, otherPlatform].map(platform =>
     platform.integrations
-      .map(i => ({...i, language: platform.id}))
+      .map(i => ({...i, language: platform.id} as PlatformIntegration))
       // filter out any tracing platforms; as they're not meant to be used as a platform for
       // the project creation flow
       .filter(integration => !(tracing as readonly string[]).includes(integration.id))

+ 1 - 1
static/app/types/project.tsx

@@ -110,7 +110,7 @@ export type Environment = {
 export type TeamWithProjects = Team & {projects: Project[]};
 
 export type PlatformIntegration = {
-  id: string;
+  id: PlatformKey;
   language: string;
   link: string | null;
   name: string;