-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherr-import-attribute-unsupported.ts
83 lines (77 loc) · 2.27 KB
/
err-import-attribute-unsupported.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/**
* @file Errors - ERR_IMPORT_ATTRIBUTE_UNSUPPORTED
* @module errnode/errors/ERR_IMPORT_ATTRIBUTE_UNSUPPORTED
* @see https://github.com/nodejs/node/blob/v22.7.0/lib/internal/errors.js#L1344-L1345
*/
import E from '#e'
import { codes } from '#src/enums'
import type {
NodeError,
NodeErrorConstructor,
Stringifiable
} from '#src/interfaces'
/**
* `ERR_IMPORT_ATTRIBUTE_UNSUPPORTED` schema.
*
* @see {@linkcode NodeError}
* @see https://nodejs.org/api/errors.html#err_import_attribute_unsupported
*
* @extends {NodeError<codes.ERR_IMPORT_ATTRIBUTE_UNSUPPORTED>}
* @extends {TypeError}
*/
interface ErrImportAttributeUnsupported
extends NodeError<codes.ERR_IMPORT_ATTRIBUTE_UNSUPPORTED>, TypeError {}
/**
* `ERR_IMPORT_ATTRIBUTE_UNSUPPORTED` message arguments.
*
* @see {@linkcode Stringifiable}
*/
type Args = [key: Stringifiable, value: unknown]
/**
* `ERR_IMPORT_ATTRIBUTE_UNSUPPORTED` constructor.
*
* @see {@linkcode Args}
* @see {@linkcode ErrImportAttributeUnsupported}
* @see {@linkcode NodeErrorConstructor}
*
* @extends {NodeErrorConstructor<ErrImportAttributeUnsupported,Args>}
*/
interface ErrImportAttributeUnsupportedConstructor
extends NodeErrorConstructor<ErrImportAttributeUnsupported, Args> {
/**
* Create a new `ERR_IMPORT_ATTRIBUTE_UNSUPPORTED` error.
*
* @see {@linkcode ErrImportAttributeUnsupported}
* @see {@linkcode Stringifiable}
*
* @param {Stringifiable} key
* Import attribute key
* @param {unknown} value
* Import attribute value
* @return {ErrImportAttributeUnsupported}
*/
new (key: Stringifiable, value: unknown): ErrImportAttributeUnsupported
}
/**
* `ERR_IMPORT_ATTRIBUTE_UNSUPPORTED` model.
*
* Thrown when an import attribute is not supported by a version of Node.js.
*
* @see {@linkcode ErrImportAttributeUnsupportedConstructor}
*
* @type {ErrImportAttributeUnsupportedConstructor}
*
* @class
*/
const ERR_IMPORT_ATTRIBUTE_UNSUPPORTED:
ErrImportAttributeUnsupportedConstructor = E(
codes.ERR_IMPORT_ATTRIBUTE_UNSUPPORTED,
TypeError,
'Import attribute "%s" with value "%s" is not supported'
)
export {
ERR_IMPORT_ATTRIBUTE_UNSUPPORTED as default,
type ErrImportAttributeUnsupported,
type Args as ErrImportAttributeUnsupportedArgs,
type ErrImportAttributeUnsupportedConstructor
}