Skip to content

Commit

Permalink
Merge pull request #55 from RateGravity/update-noneable-types
Browse files Browse the repository at this point in the history
Update 'none' converter types to be more explicit
  • Loading branch information
RoboCafaz committed Feb 9, 2024
2 parents edf615a + 9641bed commit 27e2bc5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/coercers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { displayValue } from './formatting';
import { Converter } from './core';
import { None, none } from './basic-types';
import { none } from './basic-types';

/**
* Given a set of converters if one succeeds at converting the input return the
Expand All @@ -21,9 +21,9 @@ export const coerce = <V>(
/**
* A coercer that coerces values of None type to a null literal
*/
export const noneAsNull: Converter<None> = coerce([none], null);
export const noneAsNull: Converter<null> = coerce([none], null);

/**
* A coercer that coerces values of None type to an undefined literal
*/
export const noneAsUndefined: Converter<None> = coerce([none], undefined);
export const noneAsUndefined: Converter<undefined> = coerce([none], undefined);

0 comments on commit 27e2bc5

Please sign in to comment.