Add JavaScript and TypeScript reference adapter
This commit is contained in:
parent
cb52bf8ae6
commit
58c0196be5
11 changed files with 1341 additions and 0 deletions
11
tests/fixtures/reference-javascript/src/app/shared.js
vendored
Normal file
11
tests/fixtures/reference-javascript/src/app/shared.js
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
export const DEFAULT_LIMIT = 3;
|
||||
|
||||
export function clamp(value, limit = DEFAULT_LIMIT) {
|
||||
if (value < 0) {
|
||||
return 0;
|
||||
}
|
||||
if (value > limit) {
|
||||
return limit;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue