Compare commits
No commits in common. "c464983440d1b890fe73f990d008de2717a8d084" and "5f4b882d795e35a32687bf4165f7ed1a69216767" have entirely different histories.
c464983440
...
5f4b882d79
|
@ -2,7 +2,7 @@ import browser from "webextension-polyfill";
|
||||||
|
|
||||||
export type StorageArea = browser.Storage.StorageArea;
|
export type StorageArea = browser.Storage.StorageArea;
|
||||||
|
|
||||||
export type ValueOptions<T> = {
|
type ValueOptions<T> = {
|
||||||
/** A function to convert a string to the type `T`. */
|
/** A function to convert a string to the type `T`. */
|
||||||
deserialize: (input: string) => T;
|
deserialize: (input: string) => T;
|
||||||
/** The key to use for storage. */
|
/** The key to use for storage. */
|
||||||
|
@ -35,10 +35,10 @@ export async function createValue<T>(
|
||||||
type Props<T> = Required<ValueOptions<T>>;
|
type Props<T> = Required<ValueOptions<T>>;
|
||||||
|
|
||||||
export class Value<T> implements Props<T> {
|
export class Value<T> implements Props<T> {
|
||||||
public deserialize: Props<T>["deserialize"];
|
public readonly deserialize: Props<T>["deserialize"];
|
||||||
public key: Props<T>["key"];
|
public readonly key: Props<T>["key"];
|
||||||
public serialize: Props<T>["serialize"];
|
public readonly serialize: Props<T>["serialize"];
|
||||||
public storage: Props<T>["storage"];
|
public readonly storage: Props<T>["storage"];
|
||||||
|
|
||||||
private inner: Props<T>["value"];
|
private inner: Props<T>["value"];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue