Skip to content

Commit 132773c

Browse files
authored
🤖 Merge PR DefinitelyTyped#72398 Add types for @architect/utils by @lpsinger
1 parent 459d0ed commit 132773c

File tree

6 files changed

+83
-0
lines changed

6 files changed

+83
-0
lines changed

types/architect__utils/.npmignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*
2+
!**/*.d.ts
3+
!**/*.d.cts
4+
!**/*.d.mts
5+
!**/*.d.*.ts
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import * as utils from "@architect/utils";
2+
3+
const updater = utils.updater("Example");
4+
updater.start("Hello", "world", 1);
5+
updater.debug.status("Hello world 2");
6+
updater.verbose.done();
7+
8+
utils.banner({});
9+
utils.getLambdaName("");
10+
utils.pathToUnix("");
11+
utils.toLogicalID("");

types/architect__utils/index.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export * from "./updater";
2+
3+
export function banner(params: any): void;
4+
5+
export function getLambdaName(fn: string): string;
6+
7+
export function pathToUnix(string: string): string;
8+
9+
export function toLogicalID(str: string): string;
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"private": true,
3+
"name": "@types/architect__utils",
4+
"version": "4.0.9999",
5+
"projects": [
6+
"https://github.com/architect/utils#readme"
7+
],
8+
"devDependencies": {
9+
"@types/architect__utils": "workspace:."
10+
},
11+
"owners": [
12+
{
13+
"name": "Leo Singer",
14+
"githubUsername": "lpsinger"
15+
},
16+
{
17+
"name": "Dakota Dutko",
18+
"githubUsername": "dakota002"
19+
}
20+
]
21+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"compilerOptions": {
3+
"module": "node16",
4+
"lib": [
5+
"es6"
6+
],
7+
"noImplicitAny": true,
8+
"noImplicitThis": true,
9+
"strictFunctionTypes": true,
10+
"strictNullChecks": true,
11+
"types": [],
12+
"noEmit": true,
13+
"forceConsistentCasingInFileNames": true
14+
},
15+
"files": [
16+
"index.d.ts",
17+
"architect__utils-tests.ts"
18+
]
19+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
export {};
2+
type UpdaterMethods = Record<
3+
| "start"
4+
| "status"
5+
| "done"
6+
| "cancel"
7+
| "err"
8+
| "warn"
9+
| "raw"
10+
| "update"
11+
| "stop"
12+
| "error"
13+
| "fail"
14+
| "warning",
15+
(...args: unknown[]) => void
16+
>;
17+
export type Updater = UpdaterMethods & Record<"verbose" | "debug", UpdaterMethods>;
18+
export function updater(name: string): Updater;

0 commit comments

Comments
 (0)