temp-pkg 1.0.1 → 1.0.3

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.
Files changed (3) hide show
  1. package/index.d.ts +7 -0
  2. package/index.js +4 -2
  3. package/package.json +3 -2
package/index.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ declare function helloNpm(): string;
2
+
3
+ /**
4
+ * Use "export =" for CommonJS modules that export a single value/function
5
+ * directly via module.exports.
6
+ */
7
+ export = helloNpm;
package/index.js CHANGED
@@ -1,5 +1,7 @@
1
- // index.js
2
1
  function helloNpm() {
3
2
  return "Hello NPM!";
4
3
  }
5
- module.exports = helloNpm; // Export the function
4
+
5
+ console.log(helloNpm());
6
+
7
+ module.exports = helloNpm;
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "temp-pkg",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",
7
7
  "type": "commonjs",
8
8
  "main": "index.js",
9
+ "types": "index.d.ts",
9
10
  "scripts": {
10
11
  "test": "echo \"Error: no test specified\" && exit 1"
11
12
  }
12
- }
13
+ }