mirror of https://github.com/sveltejs/svelte
parent
453b9ac2da
commit
b0604b52a3
@ -0,0 +1,11 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"include": ["."],
|
||||
|
||||
"compilerOptions": {
|
||||
"lib": ["es2017", "webworker"]
|
||||
|
||||
// TODO: remove mocha types from the whole project
|
||||
// "types": ["node", "estree"]
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
export const is_client = typeof window !== 'undefined';
|
||||
|
||||
export let now: () => number = is_client
|
||||
? () => window.performance.now()
|
||||
: () => Date.now();
|
||||
|
||||
export let raf = cb => requestAnimationFrame(cb);
|
||||
|
||||
// used internally for testing
|
||||
export function set_now(fn) {
|
||||
now = fn;
|
||||
}
|
||||
|
||||
export function set_raf(fn) {
|
||||
raf = fn;
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"include": ["."],
|
||||
|
||||
"compilerOptions": {
|
||||
"lib": ["es2015", "dom", "dom.iterable"],
|
||||
"target": "es2015",
|
||||
"types": [],
|
||||
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"svelte/*": ["*"]
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"include": ["."],
|
||||
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"checkJs": true,
|
||||
"noEmit": true
|
||||
}
|
||||
}
|
@ -1,33 +1,30 @@
|
||||
{
|
||||
"include": [],
|
||||
|
||||
"compilerOptions": {
|
||||
"target": "es2015",
|
||||
"module": "es6",
|
||||
"rootDir": "src",
|
||||
|
||||
// target node v8+ (https://node.green/)
|
||||
// the only missing feature is Array.prototype.values
|
||||
"lib": ["es2017"],
|
||||
"target": "es2017",
|
||||
|
||||
"declaration": true,
|
||||
"declarationDir": "types",
|
||||
"noImplicitThis": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
|
||||
"noEmitOnError": true,
|
||||
"lib": [
|
||||
"es5",
|
||||
"es6",
|
||||
"dom",
|
||||
"es2015"
|
||||
],
|
||||
"importHelpers": true,
|
||||
"noErrorTruncation": true,
|
||||
|
||||
// rollup takes care of these
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"svelte/internal": ["./src/runtime/internal/index"],
|
||||
"svelte/easing": ["./src/runtime/easing/index"],
|
||||
"svelte/motion": ["./src/runtime/motion/index"],
|
||||
"svelte/store": ["./src/runtime/store/index"]
|
||||
},
|
||||
"typeRoots": [
|
||||
"node_modules/@types"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*"
|
||||
]
|
||||
"resolveJsonModule": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
|
||||
// TODO: error all the things
|
||||
//"strict": true,
|
||||
"noImplicitThis": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in new issue