Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/components/platformCategorySection.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import {getCurrentPlatformOrGuide} from 'sentry-docs/docTree';
import {serverContext} from 'sentry-docs/serverContext';
import {Platform, PlatformGuide} from 'sentry-docs/types';
import {Platform, PlatformCategory, PlatformGuide} from 'sentry-docs/types';

type Props = {
children?: React.ReactNode;
noGuides?: boolean;
notSupported?: string[];
notSupported?: PlatformCategory[];
platform?: string;
supported?: string[];
supported?: PlatformCategory[];
};

const isSupported = (
platformOrGuide: Platform | PlatformGuide,
supported: string[],
notSupported: string[]
supported: PlatformCategory[],
notSupported: PlatformCategory[]
): boolean => {
if (platformOrGuide.categories === null) {
return false;
Expand Down
28 changes: 8 additions & 20 deletions src/types/platform.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,30 +138,18 @@ export interface PlatformConfig {
}

/**
* @see PlatformConfig.caseStyle
* The case style of a platform defines the casing used for sentry SDK
* functions / keywords. For example `before-send` would become `BeforeSend`
* if the caseStyle is configured as PascalCase.
*/
export enum PlatformCaseStyle {
CANONICAL = 'canonical',
CAMEL_CASE = 'camelCase',
PASCAL_CASE = 'PascalCase',
SNAKE_CASE = 'snake_case',
}
export type PlatformCaseStyle = 'canonical' | 'camelCase' | 'PascalCase' | 'snake_case';

/**
* @see PlatformConfig.supportLevel
* Is this a first-party or third-party SDK?
*/
export enum PlatformSupportLevel {
PRODUCTION = 'production',
COMMUNITY = 'community',
}
export type PlatformSupportLevel = 'production' | 'community';

/**
* @see PlatformConfig.categories
* Possible types of categories.
*/
export enum PlatformCategory {
BROWSER = 'browser',
DESKTOP = 'desktop',
MOBILE = 'mobile',
SERVER = 'server',
SERVERLESS = 'serverless',
}
export type PlatformCategory = 'browser' | 'desktop' | 'mobile' | 'server' | 'serverless';
Loading