@milkdown/exception
Advanced tools
Comparing version 4.6.9 to 4.7.0
@@ -1,2 +0,11 @@ | ||
export declare const docTypeError: <T>(type: T) => TypeError; | ||
export declare const docTypeError: (type: unknown) => Error; | ||
export declare const contextNotFound: () => Error; | ||
export declare const timerNotFound: () => Error; | ||
export declare const ctxCallOutOfScope: () => Error; | ||
export declare const createNodeInParserFail: (...args: unknown[]) => Error; | ||
export declare const stackOverFlow: () => Error; | ||
export declare const parserMatchError: (node: unknown) => Error; | ||
export declare const serializerMatchError: (node: unknown) => Error; | ||
export declare const getAtomFromSchemaFail: (type: 'mark' | 'node', name: string) => Error; | ||
export declare const expectDomTypeError: (node: unknown) => Error; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,2 +0,19 @@ | ||
export const docTypeError = (type) => new TypeError(`Doc type error, unsupported type: ${type}`); | ||
export const docTypeError = (type) => new Error(`Doc type error, unsupported type: ${JSON.stringify(type)}`); | ||
export const contextNotFound = () => new Error('Context not found, do you forget to inject it?'); | ||
export const timerNotFound = () => new Error('Timer not found, do you forget to record it?'); | ||
export const ctxCallOutOfScope = () => new Error('Should not call a context out of the plugin.'); | ||
export const createNodeInParserFail = (...args) => { | ||
const message = args.reduce((msg, arg) => { | ||
if (!arg) { | ||
return msg; | ||
} | ||
return `${msg}, ${JSON.stringify(arg)}`; | ||
}, 'Create prosemirror node from remark failed in parser'); | ||
return new Error(message); | ||
}; | ||
export const stackOverFlow = () => new Error('Stack over flow, cannot pop on an empty stack.'); | ||
export const parserMatchError = (node) => new Error(`Cannot match target parser for node: ${JSON.stringify(node)}.`); | ||
export const serializerMatchError = (node) => new Error(`Cannot match target serializer for node: ${JSON.stringify(node)}.`); | ||
export const getAtomFromSchemaFail = (type, name) => new Error(`Cannot get ${type}: ${name} from schema.`); | ||
export const expectDomTypeError = (node) => new Error(`Expect to be a dom, but get: ${JSON.stringify(node)}.`); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@milkdown/exception", | ||
"version": "4.6.9", | ||
"version": "4.7.0", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "module": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
5676
8
28
0