Skip to content

Commit 63b4cfe

Browse files
committed
chore: fix images
1 parent 77fdea4 commit 63b4cfe

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ First of let me say that I have been putting of this blog post for quite a while
99
I am a little afraid that I am not going to do TypeScript justice.
1010
The reason for that is that we are going to use it heavily - but in a rather indirect way.
1111

12-
See - we are a big fan of a [buildless]() development setup. We have [a post]() or [two]() about it :grimmacing:
12+
See - we are a big fan of a [buildless](https://dev.to/open-wc/on-the-bleeding-edge-3cb8) development setup. We have [a post](https://dev.to/open-wc/developing-without-a-build-1-introduction-26ao) or [two](https://dev.to/open-wc/developing-without-a-build-2-es-dev-server-1cf5) about it 😬
1313
It is [our belief](https://open-wc.org/about/rationales.html) that it is the best way to bring developers (you) and the platform (browser) back on the same table.
1414

1515
Knowing this makes it hard to root for TypeScript as it is a [Transpiler Language]() - in other words, it requires a build step.
@@ -27,7 +27,7 @@ expect(square(2)).to.equal(4);
2727
expect(square('two')).to.equal(4);
2828
```
2929

30-
Our plan is to accept a number and a string and return the power of it with the default of power of 2 (e.g. square it).
30+
Our plan is to accept a number or string and return the square of it.
3131

3232
Let's implement it with TypeScript:
3333

@@ -42,7 +42,7 @@ So yeah I know what you have been thinking - a string as an argument?
4242
While implementing we found out that it was a bad idea.
4343
And thanks to the power of types we can just go back to our code/tests and tada we immediately see in vscode that `square('two')` is not working.
4444

45-
![01-ts-square-two](https://github.com/daKmoR/generate-typescript-definition-files-from-javascript/blob/master/images/01-ts-square-two.png)
45+
![01-ts-square-two](https://raw.githubusercontent.com/daKmoR/generate-typescript-definition-files-from-javascript/master/images/01-ts-square-two.png)
4646

4747
And we will, of course, get the same if we try to run `tsc`.
4848

@@ -83,7 +83,7 @@ export function square(number) {
8383

8484
And our if we go back to the test now we do not see that `square('two')` is wrong :(.
8585

86-
![02-js-square-two](https://github.com/daKmoR/generate-typescript-definition-files-from-javascript/blob/master/images/02-js-square-two.png)
86+
![02-js-square-two](https://raw.githubusercontent.com/daKmoR/generate-typescript-definition-files-from-javascript/master/images/02-js-square-two.png)
8787

8888
So that is the power of types. But we can make it work for JavaScript as well :hugs:
8989

@@ -122,7 +122,7 @@ and configure TypeScript to check for JavaScript as well by adding a `tsconfig.j
122122

123123
Doing this allows as to get exactly the same behaviour in VSCode as with TypeScript.
124124

125-
![03-js-square-two-typed](https://github.com/daKmoR/generate-typescript-definition-files-from-javascript/blob/master/images/03-js-square-two-typed.png)
125+
![03-js-square-two-typed](https://raw.githubusercontent.com/daKmoR/generate-typescript-definition-files-from-javascript/master/images/03-js-square-two-typed.png)
126126

127127
We even get the same behaviour when running `tsc`.
128128

@@ -239,15 +239,15 @@ So now that we have all the information. Let's just make it work.
239239
2. Use the forked TypeScript `npm i -D typescript-temporary-fork-for-jsdoc`
240240
3. Have a `tsconfig.json` with at least
241241

242-
```json
242+
```js
243243
"allowJs": true,
244244
"checkJs": true,
245245
```
246246

247247
4. Do "type linting" via `tsc`
248248
5. Have `tsconfig.build.json` with at least
249249

250-
```json
250+
```js
251251
"declaration": true,
252252
"allowJs": true,
253253
"checkJs": true,

0 commit comments

Comments
 (0)