Skip to content

Commit 3314cd1

Browse files
✨ feat: increase strictly-speaking difficulty a bit
1 parent a7c14b9 commit 3314cd1

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

projects/configuration-options/strictly-speaking/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Of conquering soldiery.
1515
Of brave deeds and noble intentions, spoken softly so as to not sharply jut out with overt obviousness.
1616

1717
Will you repair for me this speechwriter program?
18-
I fear it was originally written without TypeScript's `--strictNullChecks` mode.
19-
You must restore strict null safety -`undefined` and all- that it may run justly and without type errors.
18+
I fear it was originally written without TypeScript's `--noImplicitAny` or `--strictNullChecks` modes.
19+
You must restore strict type safety -`undefined` and all- that it may run justly and without type errors.
2020

2121
## Setup
2222

projects/configuration-options/strictly-speaking/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { words } from "./words";
44

5-
async function seconds(amount: number) {
5+
async function seconds(amount) {
66
await new Promise((resolve) => setTimeout(resolve, amount * 1000));
77
}
88

@@ -18,7 +18,7 @@ async function speakLines(lines: (number | string)[]) {
1818
}
1919

2020
function generateLines(quantity: number) {
21-
const lines: (number | string)[] = [generateLine("Lorem ipsum")];
21+
const lines = [generateLine("Lorem ipsum")];
2222

2323
for (let i = 0; i < quantity - 1; i += 1) {
2424
lines.push(generateLine());
@@ -31,7 +31,7 @@ function generateLines(quantity: number) {
3131
return lines;
3232
}
3333

34-
function generateLine(prefix: string) {
34+
function generateLine(prefix) {
3535
const words: string[] = prefix ? [prefix] : [];
3636
const quantity = randomInt(3, 10);
3737

0 commit comments

Comments
 (0)