Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/SDK/Language/JS.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public function getKeywords(): array
'catch',
'char',
'class', // new in ECMAScript 5 and 6.
'console',
'const',
'continue',
'debugger',
Expand Down
4 changes: 2 additions & 2 deletions templates/deno/docs/example.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ const client = new Client()
{%~ endfor %}
{%~ endif %}

const {{ service.name | caseCamel }} = new {{service.name | caseUcfirst}}(client{% if service.globalParams | length %}{% for parameter in service.globalParams %}, {{ parameter | paramExample }}{% endfor %}{% endif %});
const {{ service.name | caseCamel | escapeKeyword }} = new {{service.name | caseUcfirst}}(client{% if service.globalParams | length %}{% for parameter in service.globalParams %}, {{ parameter | paramExample }}{% endfor %}{% endif %});

{% if method.type == 'location' %}const result = {% elseif method.type != 'webAuth' %}const response = await {% endif %}{{ service.name | caseCamel }}.{{ method.name | caseCamel }}({% if method.parameters.all | length == 0 %});
{% if method.type == 'location' %}const result = {% elseif method.type != 'webAuth' %}const response = await {% endif %}{{ service.name | caseCamel | escapeKeyword }}.{{ method.name | caseCamel }}({% if method.parameters.all | length == 0 %});
{% else %}{
{%~ for parameter in method.parameters.all %}
{%~ if parameter.required %}
Expand Down
4 changes: 2 additions & 2 deletions templates/node/docs/example.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ const client = new sdk.Client()
{%~ endfor %}
{%~ endif %}

const {{ service.name | caseCamel }} = new sdk.{{service.name | caseUcfirst}}(client);
const {{ service.name | caseCamel | escapeKeyword }} = new sdk.{{service.name | caseUcfirst}}(client);

const result = await {{ service.name | caseCamel }}.{{ method.name | caseCamel }}({% if method.parameters.all | length == 0 %});
const result = await {{ service.name | caseCamel | escapeKeyword }}.{{ method.name | caseCamel }}({% if method.parameters.all | length == 0 %});
{% else %}{
{%~ for parameter in method.parameters.all %}
{%~ if parameter.required %}
Expand Down
4 changes: 2 additions & 2 deletions templates/web/docs/example.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ const client = new Client()
{%~ endfor %}
{%~ endif %}

const {{ service.name | caseCamel }} = new {{service.name | caseUcfirst}}(client{% if service.globalParams | length %}{% for parameter in service.globalParams %}, {{ parameter | paramExample }}{% endfor %}{% endif %});
const {{ service.name | caseCamel | escapeKeyword }} = new {{service.name | caseUcfirst}}(client{% if service.globalParams | length %}{% for parameter in service.globalParams %}, {{ parameter | paramExample }}{% endfor %}{% endif %});

{% if method.type == 'location' %}const result = {% elseif method.type != 'webAuth' %}const result = await {% endif %}{{ service.name | caseCamel }}.{{ method.name | caseCamel }}({% if method.parameters.all | length == 0 %});
{% if method.type == 'location' %}const result = {% elseif method.type != 'webAuth' %}const result = await {% endif %}{{ service.name | caseCamel | escapeKeyword }}.{{ method.name | caseCamel }}({% if method.parameters.all | length == 0 %});
{% else %}{
{%~ for parameter in method.parameters.all %}
{%~ if parameter.required %}
Expand Down
Loading