Browse Source

ref(ui): Switch TS types from primitives (#38680)

Scott Cooper 2 years ago
parent
commit
27218b636f

+ 1 - 1
static/app/actionCreators/events.tsx

@@ -186,7 +186,7 @@ export function fetchTagFacets(
  */
 export function fetchTotalCount(
   api: Client,
-  orgSlug: String,
+  orgSlug: string,
   query: EventQuery & LocationQuery
 ): Promise<number> {
   const urlParams = pick(query, Object.values(PERFORMANCE_URL_PARAM));

+ 1 - 1
static/app/actionCreators/formSearch.tsx

@@ -13,7 +13,7 @@ type Params = {
  * Creates a list of objects to be injected by a search source
  *
  * @param route The route a form field belongs on
- * @param formGroups An array of `FormGroup: {title: String, fields: [Field]}`
+ * @param formGroups An array of `FormGroup: {title: string, fields: [Field]}`
  * @param fields An object whose key is field name and value is a `Field`
  */
 const createSearchMap = ({

+ 2 - 2
static/app/components/events/interfaces/spans/spanTreeModel.tsx

@@ -190,14 +190,14 @@ class SpanTreeModel {
     event: Readonly<EventTransaction>;
     filterSpans: FilterSpans | undefined;
     generateBounds: (bounds: SpanBoundsType) => SpanGeneratedBoundsType;
-    hiddenSpanSubTrees: Set<String>;
+    hiddenSpanSubTrees: Set<string>;
     isLastSibling: boolean;
     isNestedSpanGroupExpanded: boolean;
     isOnlySibling: boolean;
     operationNameFilters: ActiveOperationFilter;
     previousSiblingEndTimestamp: number | undefined;
     removeTraceBounds: (eventSlug: string) => void;
-    spanAncestors: Set<String>;
+    spanAncestors: Set<string>;
     spanNestedGrouping: EnhancedSpan[] | undefined;
     toggleNestedSpanGroup: (() => void) | undefined;
     treeDepth: number;

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

@@ -84,7 +84,7 @@ export type IssueCategoryCapabilities = {
 export type IssueAttachment = {
   dateCreated: string;
   event_id: string;
-  headers: Object;
+  headers: object;
   id: string;
   mimetype: string;
   name: string;

+ 1 - 1
static/app/utils/performance/contexts/genericQueryBatcher.tsx

@@ -216,7 +216,7 @@ export const GenericQueryBatcher = ({children}: {children: React.ReactNode}) =>
 
 type NodeContext = {
   batchProperty: string;
-  id: Ref<Symbol>;
+  id: Ref<symbol>;
 };
 
 const BatchNodeContext = createContext<NodeContext | undefined>(undefined);

+ 1 - 1
static/app/views/alerts/rules/issue/index.tsx

@@ -821,7 +821,7 @@ class IssueRuleEditor extends AsyncView<Props, State> {
                 // if the current owner/team isn't part of project selected, update to the first available team
                 const nextSelectedProject =
                   projects.find(({id}) => id === value) ?? selectedProject;
-                const ownerId: String | undefined = model
+                const ownerId: string | undefined = model
                   .getValue('owner')
                   ?.split(':')[1];
                 if (

+ 1 - 1
static/app/views/alerts/rules/metric/ruleConditionsForm.tsx

@@ -320,7 +320,7 @@ class RuleConditionsForm extends PureComponent<Props, State> {
                 // if the current owner/team isn't part of project selected, update to the first available team
                 const nextSelectedProject =
                   projects.find(({id}) => id === value) ?? selectedProject;
-                const ownerId: String | undefined = model
+                const ownerId: string | undefined = model
                   .getValue('owner')
                   ?.split(':')[1];
                 if (

+ 1 - 1
static/app/views/performance/transactionSummary/transactionAnomalies/utils.tsx

@@ -6,7 +6,7 @@ import {decodeScalar} from 'sentry/utils/queryString';
 import {Theme} from 'sentry/utils/theme';
 import {MutableSearch} from 'sentry/utils/tokenizeSearch';
 
-export function generateAnomaliesRoute({orgSlug}: {orgSlug: String}): string {
+export function generateAnomaliesRoute({orgSlug}: {orgSlug: string}): string {
   return `/organizations/${orgSlug}/performance/summary/anomalies/`;
 }
 

+ 1 - 1
static/app/views/performance/transactionSummary/transactionSpans/spanDetails/utils.tsx

@@ -6,7 +6,7 @@ export function generateSpanDetailsRoute({
   orgSlug,
   spanSlug,
 }: {
-  orgSlug: String;
+  orgSlug: string;
   spanSlug: SpanSlug;
 }): string {
   const spanComponent = `${encodeURIComponent(spanSlug.op)}:${spanSlug.group}`;

+ 1 - 1
static/app/views/performance/transactionSummary/transactionSpans/utils.tsx

@@ -12,7 +12,7 @@ import {MutableSearch} from 'sentry/utils/tokenizeSearch';
 
 import {SpanSort, SpanSortOption, SpanSortOthers, SpanSortPercentiles} from './types';
 
-export function generateSpansRoute({orgSlug}: {orgSlug: String}): string {
+export function generateSpansRoute({orgSlug}: {orgSlug: string}): string {
   return `/organizations/${orgSlug}/performance/summary/spans/`;
 }
 

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