make the deprecation discoverable from TSC (#18856)

This commit is contained in:
Niels Lyngsø
2025-03-31 09:56:42 +02:00
committed by GitHub
parent 0e3c8dab8f
commit 3359562e32
4 changed files with 4 additions and 7 deletions

View File

@@ -105,9 +105,8 @@ export class UmbBlockGridManagerContext<
// This property is used by some implementations, but not used in this. Do not remove. [NL]
// eslint-disable-next-line @typescript-eslint/no-unused-vars
_originData?: UmbBlockGridWorkspaceOriginData,
) {
): never {
throw new Error('Method deparecated use createWithPresets');
return {} as UmbBlockDataObjectModel<BlockLayoutType>;
}
async createWithPresets(

View File

@@ -35,9 +35,8 @@ export class UmbBlockListManagerContext<
// This property is used by some implementations, but not used in this. Do not remove. [NL]
// eslint-disable-next-line @typescript-eslint/no-unused-vars
_originData?: UmbBlockListWorkspaceOriginData,
) {
): never {
throw new Error('Method deparecated use createWithPresets');
return {} as UmbBlockDataObjectModel<BlockLayoutType>;
}
async createWithPresets(
contentElementTypeKey: string,

View File

@@ -32,9 +32,8 @@ export class UmbBlockRteManagerContext<
// This property is used by some implementations, but not used in this. Do not remove. [NL]
// eslint-disable-next-line @typescript-eslint/no-unused-vars
_originData?: UmbBlockRteWorkspaceOriginData,
) {
): never {
throw new Error('Method deparecated use createWithPresets');
return {} as UmbBlockDataObjectModel<BlockLayoutType>;
}
async createWithPresets(
contentElementTypeKey: string,

View File

@@ -334,7 +334,7 @@ export abstract class UmbBlockManagerContext<
contentElementTypeKey: string,
partialLayoutEntry?: Omit<BlockLayoutType, 'contentKey'>,
originData?: BlockOriginDataType,
): UmbBlockDataObjectModel<BlockLayoutType> | undefined;
): never;
abstract createWithPresets(
contentElementTypeKey: string,