Skip to content

Commit

Permalink
Add full TS/glint support
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbieTheWagner committed Nov 2, 2023
1 parent 857d10d commit fa8bfea
Show file tree
Hide file tree
Showing 216 changed files with 3,242 additions and 1,726 deletions.
51 changes: 48 additions & 3 deletions ember-math-helpers/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,50 @@
'use strict';

const { configs } = require('@nullvoxpopuli/eslint-configs');

module.exports = configs.ember({ prettierIntegration: true });
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
},
plugins: ['ember'],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'plugin:prettier/recommended',
],
env: {
browser: true,
},
rules: {},
overrides: [
// ts files
{
files: ['**/*.ts', '**/*.gts'],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
// Add any custom rules here
},
},
// node files
{
files: [
'./.eslintrc.cjs',
'./.prettierrc.cjs',
'./.template-lintrc.cjs',
'./addon-main.cjs',
],
parserOptions: {
sourceType: 'script',
},
env: {
browser: false,
node: true,
},
plugins: ['n'],
extends: ['plugin:n/recommended'],
},
],
};
18 changes: 17 additions & 1 deletion ember-math-helpers/babel.config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
{
"plugins": [
[
"@babel/plugin-transform-typescript",
{
"allExtensions": true,
"onlyRemoveTypeImports": true,
"allowDeclareFields": true
}
],
"@embroider/addon-dev/template-colocation-plugin",
["@babel/plugin-proposal-decorators", { "legacy": true }],
"@babel/plugin-transform-class-static-block",
[
"babel-plugin-ember-template-compilation",
{
"targetFormat": "hbs",
"transforms": []
}
],
["@babel/plugin-proposal-decorators", { "version": "legacy" }],
"@babel/plugin-proposal-class-properties"
]
}
26 changes: 26 additions & 0 deletions ember-math-helpers/declarations/helpers/abs.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
export interface AbsSignature {
Args: {
Positional: [number];
};
Return: number;
}
/**
* Uses `Math.abs` to take the absolute value of the number passed to the helper.
*
* ```hbs
* {{abs a}}
* ```
*
* @param number The number to take the absolute value of
* @return The absolute value of the passed number
*/
export declare function abs([number]: [number]): number;
declare const _default: import("@ember/component/helper").FunctionBasedHelper<{
Args: {
Positional: [number];
Named: import("@ember/component/helper").EmptyObject;
};
Return: number;
}>;
export default _default;
//# sourceMappingURL=abs.d.ts.map
1 change: 1 addition & 0 deletions ember-math-helpers/declarations/helpers/abs.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions ember-math-helpers/declarations/helpers/acos.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
export interface AcosSignature {
Args: {
Positional: [number];
};
Return: number;
}
/**
* Executes `Math.acos` on the number passed to the helper.
*
* ```hbs
* {{acos a}}
* ```
*
* @param number The number to pass to `Math.acos`
* @return The acos of the passed number
*/
export declare function acos([number]: [number]): number;
declare const _default: import("@ember/component/helper").FunctionBasedHelper<{
Args: {
Positional: [number];
Named: import("@ember/component/helper").EmptyObject;
};
Return: number;
}>;
export default _default;
//# sourceMappingURL=acos.d.ts.map
1 change: 1 addition & 0 deletions ember-math-helpers/declarations/helpers/acos.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions ember-math-helpers/declarations/helpers/acosh.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
export interface AcoshSignature {
Args: {
Positional: [number];
};
Return: number;
}
/**
* Executes `Math.acosh` on the number passed to the helper.
*
* ```hbs
* {{acosh a}}
* ```
*
* @param number The number to pass to `Math.acosh`
* @return The acosh of the passed number
*/
export declare function acosh([number]: [number]): number;
declare const _default: import("@ember/component/helper").FunctionBasedHelper<{
Args: {
Positional: [number];
Named: import("@ember/component/helper").EmptyObject;
};
Return: number;
}>;
export default _default;
//# sourceMappingURL=acosh.d.ts.map
1 change: 1 addition & 0 deletions ember-math-helpers/declarations/helpers/acosh.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions ember-math-helpers/declarations/helpers/add.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
export interface AddSignature {
Args: {
Positional: Array<number>;
};
Return: number;
}
/**
* Sums two or more numbers
*
* ```hbs
* {{add a b}}
* ```
*
* @param numbers A list of numbers to sum
* @return The sum of all the passed numbers
*/
export declare function add(numbers: Array<number>): number;
declare const _default: import("@ember/component/helper").FunctionBasedHelper<{
Args: {
Positional: number[];
Named: import("@ember/component/helper").EmptyObject;
};
Return: number;
}>;
export default _default;
//# sourceMappingURL=add.d.ts.map
1 change: 1 addition & 0 deletions ember-math-helpers/declarations/helpers/add.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions ember-math-helpers/declarations/helpers/asin.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
export interface AsinSignature {
Args: {
Positional: [number];
};
Return: number;
}
/**
* Executes `Math.asin` on the number passed to the helper.
*
* ```hbs
* {{asin a}}
* ```
*
* @param number The number to pass to `Math.asin`
* @return The asin of the passed number
*/
export declare function asin([number]: [number]): number;
declare const _default: import("@ember/component/helper").FunctionBasedHelper<{
Args: {
Positional: [number];
Named: import("@ember/component/helper").EmptyObject;
};
Return: number;
}>;
export default _default;
//# sourceMappingURL=asin.d.ts.map
1 change: 1 addition & 0 deletions ember-math-helpers/declarations/helpers/asin.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions ember-math-helpers/declarations/helpers/asinh.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
export interface AsinhSignature {
Args: {
Positional: [number];
};
Return: number;
}
/**
* Executes `Math.asinh` on the number passed to the helper.
*
* ```hbs
* {{asinh a}}
* ```
*
* @param number The number to pass to `Math.asinh`
* @return The asinh of the passed number
*/
export declare function asinh([number]: [number]): number;
declare const _default: import("@ember/component/helper").FunctionBasedHelper<{
Args: {
Positional: [number];
Named: import("@ember/component/helper").EmptyObject;
};
Return: number;
}>;
export default _default;
//# sourceMappingURL=asinh.d.ts.map
1 change: 1 addition & 0 deletions ember-math-helpers/declarations/helpers/asinh.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions ember-math-helpers/declarations/helpers/atan.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
export interface AtanSignature {
Args: {
Positional: [number];
};
Return: number;
}
/**
* Executes `Math.atan` on the number passed to the helper.
*
* ```hbs
* {{atan a}}
* ```
*
* @param number The number to pass to `Math.atan`
* @return The atan of the passed number
*/
export declare function atan([number]: [number]): number;
declare const _default: import("@ember/component/helper").FunctionBasedHelper<{
Args: {
Positional: [number];
Named: import("@ember/component/helper").EmptyObject;
};
Return: number;
}>;
export default _default;
//# sourceMappingURL=atan.d.ts.map
1 change: 1 addition & 0 deletions ember-math-helpers/declarations/helpers/atan.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions ember-math-helpers/declarations/helpers/atan2.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
export interface Atan2Signature {
Args: {
Positional: [number, number];
};
Return: number;
}
/**
* Executes `Math.atan2` on the numbers passed to the helper.
*
* ```hbs
* {{atan2 a b}}
* ```
*
* @param number1 The first number to pass to `Math.atan2`
* @param number2 The second number to pass to `Math.atan2`
* @return The atan2 of the passed numbers
*/
export declare function atan2([number1, number2]: [number, number]): number;
declare const _default: import("@ember/component/helper").FunctionBasedHelper<{
Args: {
Positional: [number, number];
Named: import("@ember/component/helper").EmptyObject;
};
Return: number;
}>;
export default _default;
//# sourceMappingURL=atan2.d.ts.map
1 change: 1 addition & 0 deletions ember-math-helpers/declarations/helpers/atan2.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions ember-math-helpers/declarations/helpers/atanh.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
export interface AtanhSignature {
Args: {
Positional: [number];
};
Return: number;
}
/**
* Executes `Math.atanh` on the number passed to the helper.
*
* ```hbs
* {{atanh a}}
* ```
*
* @param number The number to pass to `Math.atanh`
* @return The atanh of the passed number
*/
export declare function atanh([number]: [number]): number;
declare const _default: import("@ember/component/helper").FunctionBasedHelper<{
Args: {
Positional: [number];
Named: import("@ember/component/helper").EmptyObject;
};
Return: number;
}>;
export default _default;
//# sourceMappingURL=atanh.d.ts.map
1 change: 1 addition & 0 deletions ember-math-helpers/declarations/helpers/atanh.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions ember-math-helpers/declarations/helpers/cbrt.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
export interface CbrtSignature {
Args: {
Positional: [number];
};
Return: number;
}
/**
* Executes `Math.cbrt` on the number passed to the helper.
*
* ```hbs
* {{cbrt a}}
* ```
*
* @param number The number to pass to `Math.cbrt`
* @return The cbrt of the passed number
*/
export declare function cbrt([number]: [number]): number;
declare const _default: import("@ember/component/helper").FunctionBasedHelper<{
Args: {
Positional: [number];
Named: import("@ember/component/helper").EmptyObject;
};
Return: number;
}>;
export default _default;
//# sourceMappingURL=cbrt.d.ts.map
1 change: 1 addition & 0 deletions ember-math-helpers/declarations/helpers/cbrt.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fa8bfea

Please sign in to comment.