Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 2e2b0c5

Browse files
committed
fix: types on public properties in ajax-request mixin
Cast types of public properties initialized to `undefined` to `undefined | <type>` so that they can be overridden without type errors.
1 parent 838de17 commit 2e2b0c5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

addon/mixins/ajax-request.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,25 +214,25 @@ export default Mixin.create({
214214
* @property {Headers} headers
215215
* @public
216216
*/
217-
headers: undefined,
217+
headers: undefined as undefined | Headers,
218218

219219
/**
220220
* @property {string} host
221221
* @public
222222
*/
223-
host: undefined,
223+
host: undefined as undefined | string,
224224

225225
/**
226226
* @property {string} namespace
227227
* @public
228228
*/
229-
namespace: undefined,
229+
namespace: undefined as undefined | string,
230230

231231
/**
232232
* @property {Matcher[]} trustedHosts
233233
* @public
234234
*/
235-
trustedHosts: undefined,
235+
trustedHosts: undefined as undefined | Matcher[],
236236

237237
/**
238238
* Make an AJAX request, ignoring the raw XHR object and dealing only with

0 commit comments

Comments
 (0)