typenative 0.0.13 → 0.0.15

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typenative",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "description": "Build native applications using Typescript.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -9,20 +9,23 @@
9
9
  "scripts": {
10
10
  "build": "tsc",
11
11
  "watch": "tsc --watch",
12
- "start:compiler": "node ./bin/index",
13
- "start:script": "node ./bin/index --script",
14
- "test": "node ./bin/index --source test/test.ts --script",
15
- "test2": "node ./bin/index --source test/test2.ts --script",
16
- "test3": "node ./bin/index --source test/test3.ts --script",
17
- "test3_node": "tsc test/test3.ts && node test/test3.js && rimraf test/test3.js",
18
- "test4": "node ./bin/index --source test/test4.ts --script",
19
- "test5": "node ./bin/index --source test/test5.ts --script",
20
- "test6": "node ./bin/index --source test/test6.ts --script",
21
- "test7": "node ./bin/index --source test/test7.ts --script",
22
- "test8": "node ./bin/index --source test/test8.ts --script",
23
- "test9": "node ./bin/index --source test/test9.ts --script",
24
- "test10": "node ./bin/index --source test/test10.ts --script",
25
- "release": "npm publish"
12
+ "test": "node ./test/test-runner test",
13
+ "release": "npm publish",
14
+ "test1": "node ./bin/index --source test/test1.spec.ts --script",
15
+ "test2": "node ./bin/index --source test/test2.spec.ts --script",
16
+ "test3": "node ./bin/index --source test/test3.spec.ts --script",
17
+ "test3_node": "tsc test/test3.spec.ts && node test/test3.spec.js && rimraf test/test3.spec.js",
18
+ "test4": "node ./bin/index --source test/test4.spec.ts --script",
19
+ "test5": "node ./bin/index --source test/test5.spec.ts --script",
20
+ "test6": "node ./bin/index --source test/test6.spec.ts --script",
21
+ "test7": "node ./bin/index --source test/test7.spec.ts --script",
22
+ "test8": "node ./bin/index --source test/test8.spec.ts --script",
23
+ "test9": "node ./bin/index --source test/test9.spec.ts --script",
24
+ "test10": "node ./bin/index --source test/test10.spec.ts --script",
25
+ "test11": "node ./bin/index --source test/test11.spec.ts --script",
26
+ "test12": "node ./bin/index --source test/test12.spec.ts --script",
27
+ "test13": "node ./bin/index --source test/test13.spec.ts --script",
28
+ "test14": "node ./bin/index --source test/test14.spec.ts --script"
26
29
  },
27
30
  "repository": {
28
31
  "type": "git",
@@ -36,14 +39,15 @@
36
39
  "homepage": "https://github.com/danisss9/typenative#readme",
37
40
  "devDependencies": {
38
41
  "@types/fs-extra": "^11.0.4",
39
- "@types/inquirer": "^9.0.8",
40
- "@types/node": "^22.15.21",
41
- "rimraf": "^6.0.1"
42
+ "@types/inquirer": "^9.0.9",
43
+ "@types/node": "^25.2.3",
44
+ "rimraf": "^6.1.2"
42
45
  },
43
46
  "dependencies": {
44
- "execa": "^9.5.3",
45
- "fs-extra": "^11.3.0",
46
- "inquirer": "^12.6.1",
47
- "typescript": "^5.8.3"
47
+ "execa": "^9.6.1",
48
+ "fs-extra": "^11.3.3",
49
+ "inquirer": "^13.2.4",
50
+ "nanoid": "^5.1.6",
51
+ "typescript": "^5.9.3"
48
52
  }
49
53
  }
@@ -1,3 +1,33 @@
1
+ interface Boolean {}
2
+
3
+ interface CallableFunction extends Function {}
4
+
5
+ interface Function {
6
+ apply(thisArg: any, argArray?: any): any;
7
+ call(thisArg: any, ...argArray: any[]): any;
8
+ bind(thisArg: any, ...argArray: any[]): any;
9
+ }
10
+
11
+ interface IArguments {
12
+ [index: number]: any;
13
+ length: number;
14
+ }
15
+ interface NewableFunction extends Function {}
16
+
17
+ interface Number {
18
+ toString(): string;
19
+ }
20
+
21
+ interface Object {
22
+ constructor: Function;
23
+ toString(): string;
24
+ }
25
+
26
+ interface RegExp {
27
+ test(string: string): boolean;
28
+ exec(string: string): string[] | null;
29
+ }
30
+
1
31
  interface SymbolConstructor {
2
32
  readonly iterator: unique symbol;
3
33
  }
@@ -33,13 +63,75 @@ interface Array<T> extends IterableIterator<T> {
33
63
  */
34
64
  length: number;
35
65
  /**
36
- * Returns a string representation of an array.
66
+ * Appends new elements to the end of an array.
37
67
  */
38
68
  push(element: T): void;
69
+ /**
70
+ * Adds all the elements of an array into a string, separated by the specified separator string.
71
+ */
72
+ join(separator?: string): string;
73
+ /**
74
+ * Returns a copy of a section of an array.
75
+ */
76
+ slice(start?: number, end?: number): T[];
77
+ /**
78
+ * Returns the index of the first occurrence of a value in an array, or -1 if it is not present.
79
+ */
80
+ indexOf(searchElement: T): number;
81
+ /**
82
+ * Determines whether an array includes a certain element.
83
+ */
84
+ includes(searchElement: T): boolean;
85
+ /**
86
+ * Returns a string representation of an array.
87
+ */
88
+ toString(): string;
39
89
 
40
90
  [n: number]: T;
41
91
  }
42
92
 
93
+ interface String {
94
+ /** Returns the length of the string. */
95
+ length: number;
96
+ /** Returns the character at the specified index. */
97
+ charAt(pos: number): string;
98
+ /** Returns the position of the first occurrence of a substring. */
99
+ indexOf(searchString: string): number;
100
+ /** Determines whether a string contains the specified substring. */
101
+ includes(searchString: string): boolean;
102
+ /** Determines whether a string begins with the specified characters. */
103
+ startsWith(searchString: string): boolean;
104
+ /** Determines whether a string ends with the specified characters. */
105
+ endsWith(searchString: string): boolean;
106
+ /** Splits a string into substrings using the specified separator. */
107
+ split(separator: string): string[];
108
+ /** Removes whitespace from both ends of a string. */
109
+ trim(): string;
110
+ /** Removes whitespace from the beginning of a string. */
111
+ trimStart(): string;
112
+ /** Removes whitespace from the end of a string. */
113
+ trimEnd(): string;
114
+ /** Converts all characters to uppercase. */
115
+ toUpperCase(): string;
116
+ /** Converts all characters to lowercase. */
117
+ toLowerCase(): string;
118
+ /** Replaces the first occurrence of a substring. */
119
+ replace(searchValue: string, replaceValue: string): string;
120
+ /** Replaces all occurrences of a substring. */
121
+ replaceAll(searchValue: string, replaceValue: string): string;
122
+ /** Returns a section of a string. */
123
+ substring(start: number, end?: number): string;
124
+ /** Returns a section of a string. */
125
+ slice(start: number, end?: number): string;
126
+ /** Returns a string repeated the specified number of times. */
127
+ repeat(count: number): string;
128
+ /** Concatenates strings. */
129
+ concat(...strings: string[]): string;
130
+ /** Returns a string representation. */
131
+ toString(): string;
132
+ [index: number]: string;
133
+ }
134
+
43
135
  interface Console {
44
136
  log(...data: any[]): void;
45
137
  time(label?: string): void;
@@ -50,5 +142,29 @@ declare var console: Console;
50
142
  interface Math {
51
143
  random(): number;
52
144
  floor(x: number): number;
145
+ ceil(x: number): number;
146
+ round(x: number): number;
147
+ abs(x: number): number;
148
+ max(a: number, b: number): number;
149
+ min(a: number, b: number): number;
150
+ sqrt(x: number): number;
151
+ pow(base: number, exponent: number): number;
53
152
  }
54
153
  declare var Math: Math;
154
+
155
+ declare function parseInt(s: string): number;
156
+ declare function parseFloat(s: string): number;
157
+
158
+ interface Promise<T> {
159
+ then(callback: (value: T) => void): void;
160
+ }
161
+
162
+ interface PromiseConstructor {
163
+ new <T>(executor: (resolve: (value: T) => void) => void): Promise<T>;
164
+ }
165
+
166
+ declare var Promise: PromiseConstructor;
167
+
168
+ declare function setTimeout(callback: () => void, ms: number): void;
169
+
170
+ declare function assert(condition: boolean, message?: string): void;