mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 18:25:24 +00:00
Added comments
This commit is contained in:
@@ -16,6 +16,12 @@ interface AbstractModelOptions {
|
|||||||
overrides?: OverridesSupportedOptions;
|
overrides?: OverridesSupportedOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an abstract model to keep data
|
||||||
|
* in memory for future passes creation
|
||||||
|
* @param options
|
||||||
|
*/
|
||||||
|
|
||||||
export async function createAbstractModel(options: AbstractFactoryOptions) {
|
export async function createAbstractModel(options: AbstractFactoryOptions) {
|
||||||
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"));
|
||||||
|
|||||||
@@ -5,6 +5,14 @@ import { getModelContents, readCertificatesFromOptions } from "./parser";
|
|||||||
import { splitBufferBundle } from "./utils";
|
import { splitBufferBundle } from "./utils";
|
||||||
import { AbstractModel, AbstractFactoryOptions } from "./abstract";
|
import { AbstractModel, AbstractFactoryOptions } from "./abstract";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new Pass instance.
|
||||||
|
*
|
||||||
|
* @param options Options to be used to create the instance or an Abstract Model reference
|
||||||
|
* @param additionalBuffers More buffers (with file name) to be added on runtime (if you are downloading some files from the web)
|
||||||
|
* @param abstractMissingData Additional data for abstract models, that might vary from pass to pass.
|
||||||
|
*/
|
||||||
|
|
||||||
export async function createPass(
|
export async function createPass(
|
||||||
options: FactoryOptions | AbstractModel,
|
options: FactoryOptions | AbstractModel,
|
||||||
additionalBuffers?: BundleUnit,
|
additionalBuffers?: BundleUnit,
|
||||||
|
|||||||
Reference in New Issue
Block a user