@types/amdefine 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- amdefine/LICENSE +21 -0
- amdefine/README.md +72 -0
- amdefine/index.d.ts +53 -0
- amdefine/package.json +28 -0
amdefine/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE
|
amdefine/README.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Installation
|
|
2
|
+
> `npm install --save @types/amdefine`
|
|
3
|
+
|
|
4
|
+
# Summary
|
|
5
|
+
This package contains type definitions for amdefine (https://github.com/jrburke/amdefine).
|
|
6
|
+
|
|
7
|
+
# Details
|
|
8
|
+
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/amdefine.
|
|
9
|
+
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/amdefine/index.d.ts)
|
|
10
|
+
````ts
|
|
11
|
+
/// <reference types="node" />
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* AMD define function created by amdefine.
|
|
15
|
+
*/
|
|
16
|
+
interface Define {
|
|
17
|
+
/**
|
|
18
|
+
* Define a module with dependencies.
|
|
19
|
+
* @param id - Optional module ID
|
|
20
|
+
* @param dependencies - Array of dependency module IDs
|
|
21
|
+
* @param factory - Factory function or value
|
|
22
|
+
*/
|
|
23
|
+
(id: string, dependencies: string[], factory: (...modules: any[]) => any): void;
|
|
24
|
+
(id: string, dependencies: string[], factory: any): void;
|
|
25
|
+
(id: string, factory: (...modules: any[]) => any): void;
|
|
26
|
+
(id: string, factory: any): void;
|
|
27
|
+
(dependencies: string[], factory: (...modules: any[]) => any): void;
|
|
28
|
+
(dependencies: string[], factory: any): void;
|
|
29
|
+
(factory: (...modules: any[]) => any): void;
|
|
30
|
+
(factory: any): void;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* AMD define.amd property indicating AMD compatibility.
|
|
34
|
+
*/
|
|
35
|
+
amd: object;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Require function for synchronous module loading.
|
|
39
|
+
*/
|
|
40
|
+
require: NodeRequire;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Creates an AMD-style define function for use in Node.js modules.
|
|
45
|
+
*
|
|
46
|
+
* @param module - The Node.js module object for the current module
|
|
47
|
+
* @param requireFn - Optional require function (needed for Node < 0.5)
|
|
48
|
+
* @returns An AMD-compatible define function
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```javascript
|
|
52
|
+
* if (typeof define !== 'function') {
|
|
53
|
+
* var define = require('amdefine')(module);
|
|
54
|
+
* }
|
|
55
|
+
*
|
|
56
|
+
* define(['dependency'], function(dep) {
|
|
57
|
+
* return { myModule: true };
|
|
58
|
+
* });
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
declare function amdefine(module: NodeModule, requireFn?: NodeRequire): Define;
|
|
62
|
+
|
|
63
|
+
export = amdefine;
|
|
64
|
+
|
|
65
|
+
````
|
|
66
|
+
|
|
67
|
+
### Additional Details
|
|
68
|
+
* Last updated: Thu, 05 Feb 2026 08:45:22 GMT
|
|
69
|
+
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
|
|
70
|
+
|
|
71
|
+
# Credits
|
|
72
|
+
These definitions were written by [gaspard](https://github.com/gasp).
|
amdefine/index.d.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* AMD define function created by amdefine.
|
|
5
|
+
*/
|
|
6
|
+
interface Define {
|
|
7
|
+
/**
|
|
8
|
+
* Define a module with dependencies.
|
|
9
|
+
* @param id - Optional module ID
|
|
10
|
+
* @param dependencies - Array of dependency module IDs
|
|
11
|
+
* @param factory - Factory function or value
|
|
12
|
+
*/
|
|
13
|
+
(id: string, dependencies: string[], factory: (...modules: any[]) => any): void;
|
|
14
|
+
(id: string, dependencies: string[], factory: any): void;
|
|
15
|
+
(id: string, factory: (...modules: any[]) => any): void;
|
|
16
|
+
(id: string, factory: any): void;
|
|
17
|
+
(dependencies: string[], factory: (...modules: any[]) => any): void;
|
|
18
|
+
(dependencies: string[], factory: any): void;
|
|
19
|
+
(factory: (...modules: any[]) => any): void;
|
|
20
|
+
(factory: any): void;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* AMD define.amd property indicating AMD compatibility.
|
|
24
|
+
*/
|
|
25
|
+
amd: object;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Require function for synchronous module loading.
|
|
29
|
+
*/
|
|
30
|
+
require: NodeRequire;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Creates an AMD-style define function for use in Node.js modules.
|
|
35
|
+
*
|
|
36
|
+
* @param module - The Node.js module object for the current module
|
|
37
|
+
* @param requireFn - Optional require function (needed for Node < 0.5)
|
|
38
|
+
* @returns An AMD-compatible define function
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```javascript
|
|
42
|
+
* if (typeof define !== 'function') {
|
|
43
|
+
* var define = require('amdefine')(module);
|
|
44
|
+
* }
|
|
45
|
+
*
|
|
46
|
+
* define(['dependency'], function(dep) {
|
|
47
|
+
* return { myModule: true };
|
|
48
|
+
* });
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
declare function amdefine(module: NodeModule, requireFn?: NodeRequire): Define;
|
|
52
|
+
|
|
53
|
+
export = amdefine;
|
amdefine/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@types/amdefine",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "TypeScript definitions for amdefine",
|
|
5
|
+
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/amdefine",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"contributors": [
|
|
8
|
+
{
|
|
9
|
+
"name": "gaspard",
|
|
10
|
+
"githubUsername": "gasp",
|
|
11
|
+
"url": "https://github.com/gasp"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"main": "",
|
|
15
|
+
"types": "index.d.ts",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
|
19
|
+
"directory": "types/amdefine"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@types/node": "*"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {},
|
|
26
|
+
"typesPublisherContentHash": "bdaf7060a16ce13f12b1fc9b113d02370136601d41f877e5a4ac81abe3864648",
|
|
27
|
+
"typeScriptVersion": "5.2"
|
|
28
|
+
}
|