1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

DOCS: Mostly styling and links (#2178)

Co-authored-by: Tom Limoncelli <tal@whatexit.org>
This commit is contained in:
Paul Dee
2023-03-15 23:43:57 +01:00
committed by GitHub
parent 81054e72c5
commit 731181ffa1
24 changed files with 186 additions and 110 deletions

View File

@@ -36,9 +36,12 @@ type checking (i.e. red squiggly underlines when you misuse APIs), there is one
Add this comment to the top of your `dnsconfig.js` file:
{% code title="dnsconfig.js" %}
```javascript
// @ts-check
```
{% endcode %}
That should be all you need to do!
@@ -58,9 +61,12 @@ Bug: Values passed to `CLI_DEFAULTS` (and the corresponding `-v` command-line op
Workaround: create a new `.d.ts` file in the same folder as your `dnsconfig.js` file. In that file, add the following line for each variable you want to use (replacing `VARIABLE_NAME` with the name of the variable).
{% code title=".d.ts" %}
```javascript
declare const VARIABLE_NAME: string;
```
{% endcode %}
This will tell TypeScript that the variable exists, and that its a string.