mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 18:25:24 +00:00
Added Pass as exported type
This commit is contained in:
2
index.ts
2
index.ts
@@ -1 +1 @@
|
|||||||
export { createPass } from "./src/factory";
|
export { createPass, Pass } from "./src/factory";
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ import { removeHidden } from "./utils";
|
|||||||
const readDir = promisify(_readdir);
|
const readDir = promisify(_readdir);
|
||||||
const readFile = promisify(_readFile);
|
const readFile = promisify(_readFile);
|
||||||
|
|
||||||
|
export type Pass = InstanceType<typeof Pass>
|
||||||
|
|
||||||
export async function createPass(options: FactoryOptions): Promise<Pass> {
|
export async function createPass(options: FactoryOptions): Promise<Pass> {
|
||||||
if (!(options && Object.keys(options).length)) {
|
if (!(options && Object.keys(options).length)) {
|
||||||
throw new Error(formatMessage("CP_NO_OPTS"));
|
throw new Error(formatMessage("CP_NO_OPTS"));
|
||||||
|
|||||||
Reference in New Issue
Block a user