Skip to content

Commit

Permalink
Merge branch 'refactor/absurd'
Browse files Browse the repository at this point in the history
  • Loading branch information
danielo515 committed Apr 25, 2024
2 parents 5e50039 + 700f25d commit d1d76f8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
7 changes: 3 additions & 4 deletions src/FormModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ import * as R from "fp-ts/Record";
import MultiSelect from "./views/components/MultiSelect.svelte";
import FormResult, { type ModalFormData } from "./core/FormResult";
import { formDataFromFormDefaults } from "./core/formDataFromFormDefaults";
import { exhaustiveGuard } from "./safety";
import { get_tfiles_from_folder } from "./utils/files";
import type { FormDefinition, FormOptions } from "./core/formDefinition";
import { FileSuggest } from "./suggesters/suggestFile";
import { DataviewSuggest } from "./suggesters/suggestFromDataview";
import { SvelteComponent } from "svelte";
import { E, parseFunctionBody, pipe, throttle } from "@std";
import { E, parseFunctionBody, pipe, throttle, absurd } from "@std";
import { log_error, log_notice } from "./utils/Log";
import { FieldValue, FormEngine, makeFormEngine } from "./store/formStore";
import { Writable } from "svelte/store";
Expand Down Expand Up @@ -244,7 +243,7 @@ export class FormModal extends Modal {
element.onChange(fieldStore.value.set);
});
default:
exhaustiveGuard(source);
absurd(source);
}
break;
}
Expand Down Expand Up @@ -278,7 +277,7 @@ export class FormModal extends Modal {
}

default:
return exhaustiveGuard(type);
return absurd(type);
}
});

Expand Down
7 changes: 0 additions & 7 deletions src/safety.ts

This file was deleted.

3 changes: 2 additions & 1 deletion src/std/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { pipe as p, flow as f } from "fp-ts/function";
import { pipe as p, flow as f, absurd as _absurd } from "fp-ts/function";
import {
partitionMap,
findFirst,
Expand Down Expand Up @@ -38,6 +38,7 @@ export type { NonEmptyArray } from "fp-ts/NonEmptyArray";
export type { Either, Left, Right } from "fp-ts/Either";
export const flow = f;
export const pipe = p;
export const absurd = _absurd;
export const A = {
partitionMap,
partition,
Expand Down

0 comments on commit d1d76f8

Please sign in to comment.