Skip to content

Commit

Permalink
Merge pull request #159 from wentout/proto
Browse files Browse the repository at this point in the history
constuctor options fix
  • Loading branch information
wentout committed Nov 11, 2023
2 parents c8d7c05 + aa2b127 commit fc543a4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions build/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ type hook = {
(opts: hooksOpts): void;
};
type constructorOptions = {
useOldStyle: boolean;
strictChain: boolean;
blockErrors: boolean;
submitStack: boolean;
awaitReturn: boolean;
bindedProto: boolean;
useOldStyle?: boolean;
strictChain?: boolean;
blockErrors?: boolean;
submitStack?: boolean;
awaitReturn?: boolean;
bindedProto?: boolean;
};
type Proto<P, T> = Pick<P, Exclude<keyof P, keyof T>> & T;
type SN = Record<string, new () => unknown>;
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mnemonica",
"version": "0.9.977",
"version": "0.9.978",
"description": "abstract technique that aids information retention : instance inheritance system",
"type": "commonjs",
"main": "./build/index.js",
Expand Down
12 changes: 6 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,34 +37,34 @@ type constructorOptions = {
// e.g. with prototype described with:
// createInstanceModificator200XthWay
// or more general with: createInstanceModificator
useOldStyle : boolean,
useOldStyle? : boolean,

// shall or not we use strict checking
// for creation sub-instances Only from current type
// or we might use up-nested sub-instances from chain
strictChain : boolean,
strictChain? : boolean,

// should we use forced errors checking
// to make all inherited types errored
// if there is an error somewhere in chain
// disallow instance construction
// if there is an error in prototype chain
blockErrors : boolean,
blockErrors? : boolean,

// if it is necessary to collect stack
// as a __stack__ prototype property
// during the process of instance creation
submitStack : boolean,
submitStack? : boolean,

// await new Constructor()
// must return value
// optional ./issues/106
awaitReturn : boolean,
awaitReturn? : boolean,

// instance methods calls
// are binded by default
// with instance itself
bindedProto : boolean,
bindedProto? : boolean,

}

Expand Down

0 comments on commit fc543a4

Please sign in to comment.