Skip to content

Commit f1962c1

Browse files
committed
[*] some linting (ionic2 compatibility issues)
1 parent 5b327ff commit f1962c1

File tree

13 files changed

+82
-70
lines changed

13 files changed

+82
-70
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ You can find full list of interfaces [here](ts/Interfaces.ts)
122122

123123
## Changelog
124124

125+
## 2.0.0-beta.16
126+
* some linting (ionic2 compatibility issues)
127+
125128
## 2.0.0-beta.15
126129
* minor fixes, minor readme updates
127130
* exported constants

demo/typescript-project/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "api-ai-javascript-typescript-demo-project",
3-
"version": "2.0.0-beta.15",
3+
"version": "2.0.0-beta.16",
44
"description": "Javascript SDK for https://api.ai/ typescript demo project",
55
"devDependencies": {
66
"@types/es6-promise": "0.0.32",
7-
"api-ai-javascript": "^2.0.0-beta.15",
7+
"api-ai-javascript": "^2.0.0-beta.16",
88
"awesome-typescript-loader": "^3.0.0-beta.18",
99
"typescript": "^2.1.5",
1010
"webpack": "^2.2.0",

es6/ApiAiConstants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export var ApiAiConstants;
1818
AVAILABLE_LANGUAGES[AVAILABLE_LANGUAGES["RU"] = "ru"] = "RU";
1919
AVAILABLE_LANGUAGES[AVAILABLE_LANGUAGES["UK"] = "uk"] = "UK";
2020
})(AVAILABLE_LANGUAGES = ApiAiConstants.AVAILABLE_LANGUAGES || (ApiAiConstants.AVAILABLE_LANGUAGES = {}));
21-
ApiAiConstants.VERSION = "2.0.0-beta.15";
21+
ApiAiConstants.VERSION = "2.0.0-beta.16";
2222
ApiAiConstants.DEFAULT_BASE_URL = "https://api.api.ai/v1/";
2323
ApiAiConstants.DEFAULT_API_VERSION = "20150910";
2424
ApiAiConstants.DEFAULT_CLIENT_LANG = AVAILABLE_LANGUAGES.EN;

es6/Stream/RecorderWorker.js

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// import Resampler from "./Resampler";
2+
// import Resampler from "./Resampler";
13
export default class RecorderWorker {
24
static createRecorderWorker() {
35
return function _recorderWorkerJs() {
@@ -68,38 +70,41 @@ export default class RecorderWorker {
6870
view.setUint8(offset + i, string.charCodeAt(i));
6971
}
7072
}
71-
function encodeWAV(samples) {
73+
/* function encodeWAV(samples) {
7274
var buffer = new ArrayBuffer(44 + samples.length * 2);
7375
var view = new DataView(buffer);
74-
/* RIFF identifier */
76+
77+
// RIFF identifier
7578
_writeString(view, 0, 'RIFF');
76-
/* file length */
79+
// file length
7780
view.setUint32(4, 32 + samples.length * 2, true);
78-
/* RIFF type */
81+
// RIFF type
7982
_writeString(view, 8, 'WAVE');
80-
/* format chunk identifier */
83+
// format chunk identifier
8184
_writeString(view, 12, 'fmt ');
82-
/* format chunk length */
85+
// format chunk length
8386
view.setUint32(16, 16, true);
84-
/* sample format (raw) */
87+
// sample format (raw)
8588
view.setUint16(20, 1, true);
86-
/* channel count */
89+
// channel count
8790
view.setUint16(22, 2, true);
88-
/* sample rate */
91+
// sample rate
8992
view.setUint32(24, sampleRate, true);
90-
/* byte rate (sample rate * block align) */
93+
// byte rate (sample rate * block align)
9194
view.setUint32(28, sampleRate * 4, true);
92-
/* block align (channel count * bytes per sample) */
95+
// block align (channel count * bytes per sample)
9396
view.setUint16(32, 4, true);
94-
/* bits per sample */
97+
// bits per sample
9598
view.setUint16(34, 16, true);
96-
/* data chunk identifier */
97-
_writeString(view, 36, 'data');
98-
/* data chunk length */
99+
// data chunk identifier
100+
_writeString(view, 36, "data");
101+
// data chunk length
99102
view.setUint32(40, samples.length * 2, true);
103+
100104
_floatTo16BitPCM(view, 44, samples);
105+
101106
return view;
102-
}
107+
} */
103108
function encodeRAW(samples) {
104109
var buffer = new ArrayBuffer(samples.length * 2);
105110
var view = new DataView(buffer);

es6/XhrRequest.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ class XhrRequest {
9494
}
9595
XhrRequest.XMLHttpFactories = [
9696
() => new XMLHttpRequest(),
97-
() => new ActiveXObject("Msxml2.XMLHTTP"),
98-
() => new ActiveXObject("Msxml3.XMLHTTP"),
99-
() => new ActiveXObject("Microsoft.XMLHTTP")
97+
() => new window["ActiveXObject"]("Msxml2.XMLHTTP"),
98+
() => new window["ActiveXObject"]("Msxml3.XMLHTTP"),
99+
() => new window["ActiveXObject"]("Microsoft.XMLHTTP")
100100
];
101101
(function (XhrRequest) {
102102
var Method;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "api-ai-javascript",
3-
"version": "2.0.0-beta.15",
3+
"version": "2.0.0-beta.16",
44
"description": "Javascript SDK for https://api.ai/",
55
"main": "index",
66
"dependencies": {

target/ApiAi.js

Lines changed: 24 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

target/ApiAi.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

target/ApiAi.streamless.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)