{
"compilerOptions": {
"noImplicitAny": true,
"removeComments": true,
"target": "es5",
"noEmit": true,
"esModuleInterop": true,
"isolatedModules": true,
"typeRoots": ["src/plugin/types/slider.d.ts"], //вот
"types": ["node", "chai", "mocha", "jquery"] //и вот
},
"include": ["src/plugin/types/slider.d.ts", "src/plugin/slider/slider.ts"],
"exclude": ["build/*", "dist/*", "node_modules/*", "src/plugin/tests/*"],
"awesomeTypescriptLoaderOptions": {
"useBabel": true,
"babelOptions": {
"babelrc": true
},
"babelCore": "@babel/core"
}
}
export { JQuery, AdditionalClasses, Settings, Elements, MethodsToElements };
interface JQuery {
slider: (options?: Object) => JQuery<HTMLElement>; //вот тут (Type 'JQuery' is not generic.)
}
interface AdditionalClasses {
wrapper?: string;
base?: string;
handler?: string;
connector?: string;
}
interface Settings {
min: number;
max: number;
range: boolean;
startValue: Array<number>;
align: number;
additionalClasses: AdditionalClasses;
}
interface Elements {
parent?: JQuery<HTMLElement>; //и здесь везде (Type 'JQuery' is not generic.)
wrapper: JQuery<HTMLElement>;
base: JQuery<HTMLElement>;
handlers: Array<JQuery<HTMLElement>>;
connector: JQuery<HTMLElement>;
}
interface MethodsToElements {
wrapper: Array<Function>;
base: Array<Function>;
handler: Array<Function>;
connector: Array<Function>;
}
export { JQuery, AdditionalClasses, Settings, Elements, MethodsToElements };
BEGIN
DECLARE id integer;
DECLARE salary integer DEFAULT 0;
DECLARE avg_salary integer DEFAULT 0;
DECLARE counter integer DEFAULT 0;
Declare done integer DEFAULT 0;
Declare employeeCursor Cursor for SELECT idEmployee FROM employees;
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done=1;
Open employeeCursor;
WHILE done = 0 DO
FETCH employeeCursor INTO id;
SET @p0=id;
CALL `GET_SALARY`(@p0, @p1);
SELECT @p1 INTO salary;
if (salary > 0) then
SET avg_salary = avg_salary + salary;
SET counter = counter + 1;
end if;
END WHILE;
SET avg_salary = avg_salary / counter;
SET result = avg_salary;
Close employeeCursor;
END