Skip to content

Commit

Permalink
chore: remove redundant as const
Browse files Browse the repository at this point in the history
  • Loading branch information
littlespex committed Oct 28, 2024
1 parent 82bca7a commit 8ea8bdf
Show file tree
Hide file tree
Showing 18 changed files with 51 additions and 70 deletions.
81 changes: 31 additions & 50 deletions lib/config/common-media-library.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,19 @@ export type Cmcd = {
};

// @beta
export const CMCD_PARAM: "CMCD";
export const CMCD_OBJECT = "CMCD-Object";

// @beta
export const CMCD_V1: 1;
export const CMCD_PARAM = "CMCD";

// @beta
export const CMCD_REQUEST = "CMCD-Request";

// @beta
export const CMCD_SESSION = "CMCD-Session";

// @beta
export const CMCD_STATUS = "CMCD-Status";

// @beta
export type CmcdCustomKey = `${string}-${string}`;
Expand All @@ -117,16 +126,14 @@ export type CmcdEncodeOptions = {
baseUrl?: string;
};

// Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "CmcdEncoding" because one of its declarations is marked as @internal
//
// @beta
export const CmcdEncoding: {
readonly JSON: typeof CMCD_JSON;
readonly QUERY: typeof CMCD_QUERY;
readonly HEADERS: typeof CMCD_HEADERS;
};

// @internal (undocumented)
// @beta (undocumented)
export type CmcdEncoding = typeof CmcdEncoding[keyof typeof CmcdEncoding];

// @beta
Expand All @@ -135,8 +142,6 @@ export type CmcdFormatter = (value: CmcdValue, options?: CmcdEncodeOptions) => s
// @beta
export const CmcdFormatters: Record<string, CmcdFormatter>;

// Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "CmcdHeaderField" because one of its declarations is marked as @internal
//
// @beta
export const CmcdHeaderField: {
readonly OBJECT: typeof CMCD_OBJECT;
Expand All @@ -145,7 +150,7 @@ export const CmcdHeaderField: {
readonly STATUS: typeof CMCD_STATUS;
};

// @internal (undocumented)
// @beta (undocumented)
export type CmcdHeaderField = typeof CmcdHeaderField[keyof typeof CmcdHeaderField];

// @beta
Expand All @@ -154,52 +159,28 @@ export type CmcdHeadersMap = Record<CmcdHeaderField, CmcdKey[]>;
// @beta
export type CmcdKey = keyof Cmcd;

// Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "CmcdObjectType" because one of its declarations is marked as @internal
// Warning: (ae-forgotten-export) The symbol "CmObjectType" needs to be exported by the entry point index.d.ts
//
// @beta
export const CmcdObjectType: {
readonly MANIFEST: "m";
readonly AUDIO: "a";
readonly VIDEO: "v";
readonly MUXED: "av";
readonly INIT: "i";
readonly CAPTION: "c";
readonly TIMED_TEXT: "tt";
readonly KEY: "k";
readonly OTHER: "o";
};
export const CmcdObjectType: typeof CmObjectType;

// Warning: (ae-forgotten-export) The symbol "CmObjectType" needs to be exported by the entry point index.d.ts
//
// @internal (undocumented)
// @beta (undocumented)
export type CmcdObjectType = CmObjectType;

// Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "CmcdStreamingFormat" because one of its declarations is marked as @internal
// Warning: (ae-forgotten-export) The symbol "CmStreamingFormat" needs to be exported by the entry point index.d.ts
//
// @beta
export const CmcdStreamingFormat: {
readonly DASH: "d";
readonly HLS: "h";
readonly SMOOTH: "s";
readonly OTHER: "o";
};
export const CmcdStreamingFormat: typeof CmStreamingFormat;

// Warning: (ae-forgotten-export) The symbol "CmStreamingFormat" needs to be exported by the entry point index.d.ts
//
// @internal (undocumented)
// @beta (undocumented)
export type CmcdStreamingFormat = CmStreamingFormat;

// Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "CmcdStreamType" because one of its declarations is marked as @internal
// Warning: (ae-forgotten-export) The symbol "CmStreamType" needs to be exported by the entry point index.d.ts
//
// @beta
export const CmcdStreamType: {
readonly VOD: "v";
readonly LIVE: "l";
};
export const CmcdStreamType: typeof CmStreamType;

// Warning: (ae-forgotten-export) The symbol "CmStreamType" needs to be exported by the entry point index.d.ts
//
// @internal (undocumented)
// @beta (undocumented)
export type CmcdStreamType = CmStreamType;

// @beta
Expand Down Expand Up @@ -249,9 +230,11 @@ export const CmsdHeaderField: {
readonly DYNAMIC: typeof CMSD_DYNAMIC;
};

// @beta
// @beta (undocumented)
export type CmsdHeaderField = typeof CmsdHeaderField[keyof typeof CmsdHeaderField];

// Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "CmsdObjectType" because one of its declarations is marked as @internal
//
// @beta
export const CmsdObjectType: {
readonly MANIFEST: "m";
Expand All @@ -265,7 +248,7 @@ export const CmsdObjectType: {
readonly OTHER: "o";
};

// @beta
// @internal (undocumented)
export type CmsdObjectType = typeof CmsdObjectType[keyof typeof CmsdObjectType];

// @beta
Expand Down Expand Up @@ -293,7 +276,7 @@ export const CmsdStreamingFormat: {
readonly OTHER: "o";
};

// @beta
// @beta (undocumented)
export type CmsdStreamingFormat = typeof CmsdStreamingFormat[keyof typeof CmsdStreamingFormat];

// @beta
Expand All @@ -302,7 +285,7 @@ export const CmsdStreamType: {
readonly LIVE: "l";
};

// @beta
// @beta (undocumented)
export type CmsdStreamType = typeof CmsdStreamType[keyof typeof CmsdStreamType];

// @beta
Expand Down Expand Up @@ -805,6 +788,8 @@ export type Validation = {
errorMessages: string[];
};

// Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "VerboseLevel" because one of its declarations is marked as @internal
//
// @beta
export const VerboseLevel: {
readonly ERROR: 0;
Expand All @@ -815,7 +800,7 @@ export const VerboseLevel: {
readonly DATA: 3;
};

// @beta
// @internal (undocumented)
export type VerboseLevel = typeof VerboseLevel[keyof typeof VerboseLevel];

// @alpha
Expand All @@ -833,9 +818,5 @@ export type VideoTrack = Track & {
// src/cmcd/CmcdEncoding.ts:18:2 - (ae-forgotten-export) The symbol "CMCD_JSON" needs to be exported by the entry point index.d.ts
// src/cmcd/CmcdEncoding.ts:23:2 - (ae-forgotten-export) The symbol "CMCD_QUERY" needs to be exported by the entry point index.d.ts
// src/cmcd/CmcdEncoding.ts:28:2 - (ae-forgotten-export) The symbol "CMCD_HEADERS" needs to be exported by the entry point index.d.ts
// src/cmcd/CmcdHeaderField.ts:19:2 - (ae-forgotten-export) The symbol "CMCD_OBJECT" needs to be exported by the entry point index.d.ts
// src/cmcd/CmcdHeaderField.ts:24:2 - (ae-forgotten-export) The symbol "CMCD_REQUEST" needs to be exported by the entry point index.d.ts
// src/cmcd/CmcdHeaderField.ts:29:2 - (ae-forgotten-export) The symbol "CMCD_SESSION" needs to be exported by the entry point index.d.ts
// src/cmcd/CmcdHeaderField.ts:34:2 - (ae-forgotten-export) The symbol "CMCD_STATUS" needs to be exported by the entry point index.d.ts

```
2 changes: 1 addition & 1 deletion lib/src/cmcd/CMCD_HEADERS.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const CMCD_HEADERS = 'headers' as const;
export const CMCD_HEADERS = 'headers';
2 changes: 1 addition & 1 deletion lib/src/cmcd/CMCD_JSON.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const CMCD_JSON = 'json' as const;
export const CMCD_JSON = 'json';
2 changes: 1 addition & 1 deletion lib/src/cmcd/CMCD_OBJECT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
*
* @beta
*/
export const CMCD_OBJECT = 'CMCD-Object' as const;
export const CMCD_OBJECT = 'CMCD-Object';
2 changes: 1 addition & 1 deletion lib/src/cmcd/CMCD_PARAM.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
*
* @beta
*/
export const CMCD_PARAM = 'CMCD' as const;
export const CMCD_PARAM = 'CMCD';
2 changes: 1 addition & 1 deletion lib/src/cmcd/CMCD_QUERY.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const CMCD_QUERY = 'query' as const;
export const CMCD_QUERY = 'query';
2 changes: 1 addition & 1 deletion lib/src/cmcd/CMCD_REQUEST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
*
* @beta
*/
export const CMCD_REQUEST = 'CMCD-Request' as const;
export const CMCD_REQUEST = 'CMCD-Request';
2 changes: 1 addition & 1 deletion lib/src/cmcd/CMCD_SESSION.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
*
* @beta
*/
export const CMCD_SESSION = 'CMCD-Session' as const;
export const CMCD_SESSION = 'CMCD-Session';
2 changes: 1 addition & 1 deletion lib/src/cmcd/CMCD_STATUS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
*
* @beta
*/
export const CMCD_STATUS = 'CMCD-Status' as const;
export const CMCD_STATUS = 'CMCD-Status';
2 changes: 1 addition & 1 deletion lib/src/cmcd/CMCD_V1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
*
* @beta
*/
export const CMCD_V1 = 1 as const;
export const CMCD_V1 = 1;
2 changes: 1 addition & 1 deletion lib/src/cmcd/CmcdEncoding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ export const CmcdEncoding = {
} as const;

/**
* @internal
* @beta
*/
export type CmcdEncoding = typeof CmcdEncoding[keyof typeof CmcdEncoding];
2 changes: 1 addition & 1 deletion lib/src/cmcd/CmcdHeaderField.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ export const CmcdHeaderField = {
} as const;

/**
* @internal
* @beta
*/
export type CmcdHeaderField = typeof CmcdHeaderField[keyof typeof CmcdHeaderField];
4 changes: 2 additions & 2 deletions lib/src/cmcd/CmcdObjectType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import { CmObjectType } from '../cta/CmObjectType';
*
* @enum
*/
export const CmcdObjectType = CmObjectType;
export const CmcdObjectType = CmObjectType as typeof CmObjectType;

/**
* @internal
* @beta
*/
export type CmcdObjectType = CmObjectType;
4 changes: 2 additions & 2 deletions lib/src/cmcd/CmcdStreamType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import { CmStreamType } from '../cta/CmStreamType';
*
* @beta
*/
export const CmcdStreamType = CmStreamType;
export const CmcdStreamType = CmStreamType as typeof CmStreamType;

/**
* @internal
* @beta
*/
export type CmcdStreamType = CmStreamType;
4 changes: 2 additions & 2 deletions lib/src/cmcd/CmcdStreamingFormat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import { CmStreamingFormat } from '../cta/CmStreamingFormat';
*
* @beta
*/
export const CmcdStreamingFormat = CmStreamingFormat;
export const CmcdStreamingFormat = CmStreamingFormat as typeof CmStreamingFormat;

/**
* @internal
* @beta
*/
export type CmcdStreamingFormat = CmStreamingFormat
2 changes: 1 addition & 1 deletion lib/src/cmsd/CmsdHeaderField.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ export const CmsdHeaderField = {
} as const;

/**
* @internal
* @beta
*/
export type CmsdHeaderField = typeof CmsdHeaderField[keyof typeof CmsdHeaderField];
2 changes: 1 addition & 1 deletion lib/src/cmsd/CmsdStreamType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ export const CmsdStreamType = {
} as const;

/**
* @internal
* @beta
*/
export type CmsdStreamType = typeof CmsdStreamType[keyof typeof CmsdStreamType];
2 changes: 1 addition & 1 deletion lib/src/cmsd/CmsdStreamingFormat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ export const CmsdStreamingFormat = {
} as const;

/**
* @internal
* @beta
*/
export type CmsdStreamingFormat = typeof CmsdStreamingFormat[keyof typeof CmsdStreamingFormat];

0 comments on commit 8ea8bdf

Please sign in to comment.