Browse Source

ref(ts): Remove fixture type aliases (#62588)

Now that fixtures are all suffixed with `Fixture` this is not needed.
https://github.com/getsentry/frontend-tsc/issues/49 💅🏻
George Gritsouk 1 year ago
parent
commit
1d66774365

+ 2 - 4
fixtures/js-stubs/accessRequest.tsx

@@ -1,11 +1,9 @@
 import {MemberFixture} from 'sentry-fixture/member';
 import {MemberFixture} from 'sentry-fixture/member';
 import {TeamFixture} from 'sentry-fixture/team';
 import {TeamFixture} from 'sentry-fixture/team';
 
 
-import {AccessRequest as AccessRequestType} from 'sentry/types';
+import {AccessRequest} from 'sentry/types';
 
 
-export function AccessRequestFixture(
-  params: Partial<AccessRequestType> = {}
-): AccessRequestType {
+export function AccessRequestFixture(params: Partial<AccessRequest> = {}): AccessRequest {
   return {
   return {
     id: '123',
     id: '123',
     member: MemberFixture(),
     member: MemberFixture(),

+ 2 - 2
fixtures/js-stubs/actor.tsx

@@ -1,6 +1,6 @@
-import type {Actor as ActorType} from 'sentry/types';
+import type {Actor} from 'sentry/types';
 
 
-export function ActorFixture(params: Partial<ActorType> = {}): ActorType {
+export function ActorFixture(params: Partial<Actor> = {}): Actor {
   return {
   return {
     id: '1',
     id: '1',
     email: 'foo@example.com',
     email: 'foo@example.com',

+ 3 - 3
fixtures/js-stubs/apiApplication.tsx

@@ -1,8 +1,8 @@
-import type {ApiApplication as ApiApplicationType} from 'sentry/types';
+import type {ApiApplication} from 'sentry/types';
 
 
 export function ApiApplicationFixture(
 export function ApiApplicationFixture(
-  params: Partial<ApiApplicationType> = {}
-): ApiApplicationType {
+  params: Partial<ApiApplication> = {}
+): ApiApplication {
   return {
   return {
     allowedOrigins: [],
     allowedOrigins: [],
     clientID: 'aowekr12903i9i423094i23904j',
     clientID: 'aowekr12903i9i423094i23904j',

+ 3 - 3
fixtures/js-stubs/apiToken.tsx

@@ -1,8 +1,8 @@
-import type {InternalAppApiToken as InternalAppApiTokenType} from 'sentry/types';
+import type {InternalAppApiToken} from 'sentry/types';
 
 
 export function ApiTokenFixture(
 export function ApiTokenFixture(
-  params: Partial<InternalAppApiTokenType> = {}
-): InternalAppApiTokenType {
+  params: Partial<InternalAppApiToken> = {}
+): InternalAppApiToken {
   return {
   return {
     id: '1',
     id: '1',
     token: 'apitoken123',
     token: 'apitoken123',

+ 2 - 2
fixtures/js-stubs/auditLogs.tsx

@@ -1,8 +1,8 @@
 import {UserFixture} from 'sentry-fixture/user';
 import {UserFixture} from 'sentry-fixture/user';
 
 
-import type {AuditLog as AuditLogType} from 'sentry/types';
+import type {AuditLog} from 'sentry/types';
 
 
-export function AuditLogsFixture(params: AuditLogType[] = []): AuditLogType[] {
+export function AuditLogsFixture(params: AuditLog[] = []): AuditLog[] {
   return [
   return [
     {
     {
       note: 'edited project ludic-science',
       note: 'edited project ludic-science',

+ 2 - 4
fixtures/js-stubs/authProvider.tsx

@@ -1,8 +1,6 @@
-import type {AuthProvider as AuthProviderType} from 'sentry/types';
+import type {AuthProvider} from 'sentry/types';
 
 
-export function AuthProviderFixture(
-  params: Partial<AuthProviderType> = {}
-): AuthProviderType {
+export function AuthProviderFixture(params: Partial<AuthProvider> = {}): AuthProvider {
   return {
   return {
     key: 'auth_provider_key',
     key: 'auth_provider_key',
     name: 'auth_provider_name',
     name: 'auth_provider_name',

+ 2 - 4
fixtures/js-stubs/authProviders.tsx

@@ -1,10 +1,8 @@
 import {AuthProviderFixture} from 'sentry-fixture/authProvider';
 import {AuthProviderFixture} from 'sentry-fixture/authProvider';
 
 
-import type {AuthProvider as AuthProviderType} from 'sentry/types';
+import type {AuthProvider} from 'sentry/types';
 
 
-export function AuthProvidersFixture(
-  params: AuthProviderType[] = []
-): AuthProviderType[] {
+export function AuthProvidersFixture(params: AuthProvider[] = []): AuthProvider[] {
   return [
   return [
     AuthProviderFixture({
     AuthProviderFixture({
       key: 'dummy',
       key: 'dummy',

+ 11 - 11
fixtures/js-stubs/authenticators.tsx

@@ -1,16 +1,16 @@
 import type {
 import type {
-  RecoveryAuthenticator as RecoveryAuthenticatorType,
-  SmsAuthenticator as SmsAuthenticatorType,
-  TotpAuthenticator as TotpAuthenticatorType,
-  U2fAuthenticator as U2fAuthenticatorType,
-  UserEnrolledAuthenticator as UserEnrolledAuthenticatorType,
+  RecoveryAuthenticator,
+  SmsAuthenticator,
+  TotpAuthenticator,
+  U2fAuthenticator,
+  UserEnrolledAuthenticator,
 } from 'sentry/types';
 } from 'sentry/types';
 
 
 export function AuthenticatorsFixture(): {
 export function AuthenticatorsFixture(): {
-  Recovery: (props?: Partial<RecoveryAuthenticatorType>) => RecoveryAuthenticatorType;
-  Sms: (props?: Partial<SmsAuthenticatorType>) => SmsAuthenticatorType;
-  Totp: (props?: Partial<TotpAuthenticatorType>) => TotpAuthenticatorType;
-  U2f: (props?: Partial<U2fAuthenticatorType>) => U2fAuthenticatorType;
+  Recovery: (props?: Partial<RecoveryAuthenticator>) => RecoveryAuthenticator;
+  Sms: (props?: Partial<SmsAuthenticator>) => SmsAuthenticator;
+  Totp: (props?: Partial<TotpAuthenticator>) => TotpAuthenticator;
+  U2f: (props?: Partial<U2fAuthenticator>) => U2fAuthenticator;
 } {
 } {
   return {
   return {
     Totp: (p = {}) => ({
     Totp: (p = {}) => ({
@@ -133,8 +133,8 @@ export function AllAuthenticatorsFixture() {
 }
 }
 
 
 export function UserEnrolledAuthenticatorFixture(
 export function UserEnrolledAuthenticatorFixture(
-  params: Partial<UserEnrolledAuthenticatorType>
-): UserEnrolledAuthenticatorType {
+  params: Partial<UserEnrolledAuthenticator>
+): UserEnrolledAuthenticator {
   return {
   return {
     id: '1',
     id: '1',
     type: 'totp',
     type: 'totp',

+ 3 - 3
fixtures/js-stubs/availableNotificationActions.tsx

@@ -1,8 +1,8 @@
-import type {AvailableNotificationAction as AvailableNotificationActionType} from 'sentry/types';
+import type {AvailableNotificationAction} from 'sentry/types';
 
 
 export function AvailableNotificationActionsFixture(
 export function AvailableNotificationActionsFixture(
-  params: AvailableNotificationActionType[] = []
-): {actions: AvailableNotificationActionType[]} {
+  params: AvailableNotificationAction[] = []
+): {actions: AvailableNotificationAction[]} {
   return {
   return {
     actions: [
     actions: [
       {
       {

+ 2 - 2
fixtures/js-stubs/broadcast.tsx

@@ -1,6 +1,6 @@
-import type {Broadcast as BroadcastType} from 'sentry/types';
+import type {Broadcast} from 'sentry/types';
 
 
-export function BroadcastFixture(params: Partial<BroadcastType> = {}): BroadcastType {
+export function BroadcastFixture(params: Partial<Broadcast> = {}): Broadcast {
   return {
   return {
     dateCreated: new Date().toISOString(),
     dateCreated: new Date().toISOString(),
     dateExpires: new Date().toISOString(),
     dateExpires: new Date().toISOString(),

Some files were not shown because too many files changed in this diff