Skip to content

Commit

Permalink
fix!: remove things labelled deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaStevens committed Oct 14, 2024
1 parent 2b5c412 commit 64d2a34
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 28 deletions.
4 changes: 1 addition & 3 deletions scripts/generate-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,7 @@ function getExponentTypeDefintion() {
}

function getNegativeExponentTypeDefintion() {
const main = `/**\n * @group Exponent Functions\n */\nexport type NegateExponent<T extends Exponent> = MultiplyExponents<T, -1>`;
const deprecated = `/**\n * @deprecated Use {@link NegateExponent} instead.\n */\nexport type NegativeExponent<T extends Exponent> = NegateExponent<T>`;
return [main, deprecated].join("\n\n");
return `/**\n * @group Exponent Functions\n */\nexport type NegateExponent<T extends Exponent> = MultiplyExponents<T, -1>`;
}

function getSumExponentsTypeDefintion() {
Expand Down
16 changes: 0 additions & 16 deletions src/deprecated.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export type {
SubExponents,
SumExponents,
} from "./exponents";
export type { DivideUnitExponents, MultiplyUnitExponents } from "./deprecated";
export type {
Divide,
DivideUnitSubvalues,
Expand Down
7 changes: 0 additions & 7 deletions src/units/modifiers/reciprocal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@ export type Reciprocal<
? UnitMeta<InverseUnitSubvalues<T["__uom_types__value"]>>
: never;

/**
* Invert the {@link UnitClass}.
*
* @deprecated Use {@link Reciprocal} instead.
*/
export type ReciprocalUnitClass<T extends UnknownUnitClass> = UnitClass<InverseUnitSubvalues<T["__uom_types__value"]>>;

// Tests
if (import.meta.vitest !== undefined) {
const { describe, it } = import.meta.vitest;
Expand Down
2 changes: 1 addition & 1 deletion vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export default defineConfig({
include: ["./**/*.test.ts"],
includeSource: [
"src/**/[!index]*.ts",
"!src/deprecated.ts",
"!src/exponents.ts",
"!src/units/converters/prefixes.ts",
"!src/units/modifiers/prefixes.ts",
],
coverage: {
Expand Down

0 comments on commit 64d2a34

Please sign in to comment.