Skip to content

Commit 5583c9d

Browse files
authored
Merge pull request #203 from appwrite/fix-node-typings
fix(node): typings
2 parents cf2fd15 + 1ee3427 commit 5583c9d

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

templates/node/index.d.ts.twig

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,9 @@ declare module "{{ language.params.npmPackage|caseDash }}" {
6060
* @param {{ '{' }}{{ parameter.type | typeName }}{{ '}' }} {{ parameter.name | caseCamel }}
6161
{% endfor %}
6262
* @throws {{ '{' }}{{ spec.title | caseUcfirst}}Exception}
63-
* @returns {% if method.type == 'location' %}{string}{% else %}{Promise}{% endif %}
64-
63+
* @returns {Promise}
6564
*/
66-
{{ method.name | caseCamel }}{% if method.type != 'location' %}<T extends unknown>{% endif %}({% for parameter in method.parameters.all %}{{ parameter.name | caseCamel }}{% if not parameter.required %}?{% endif %}: {% if parameter.type == 'array' %}{{attribute(parameter, 'array').type}}[]{% else %}{{ parameter.type | typeName }}{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}): {% if method.type == 'location' %}string{% else %}Promise<T>{% endif %};
65+
{{ method.name | caseCamel }}{% if method.type != 'location' %}<T extends unknown>{% endif %}({% for parameter in method.parameters.all %}{{ parameter.name | caseCamel }}{% if not parameter.required %}?{% endif %}: {% if parameter.type == 'array' %}{{attribute(parameter, 'array').type}}[]{% else %}{{ parameter.type | typeName }}{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}): Promise<{% if method.type == 'location' %}Buffer{% else %}T{% endif %}>;
6766
{% endfor %}
6867
}
6968
{% endfor %}

templates/node/lib/services/service.js.twig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class {{ service.name | caseUcfirst }} extends Service {
1616
{% endfor %}
1717
* @throws {{ '{' }}{{ spec.title | caseUcfirst}}Exception}
1818
* @returns {Promise}
19-
2019
*/
2120
async {{ method.name | caseCamel }}({% for parameter in method.parameters.all %}{{ parameter.name | caseCamel }}{% if not loop.last %}, {% endif %}{% endfor %}) {
2221
{% for parameter in method.parameters.all %}

0 commit comments

Comments
 (0)