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": {
|
"compilerOptions": {
|
||||||
"target": "es2015",
|
"rootDir": "src",
|
||||||
"module": "es6",
|
|
||||||
|
// target node v8+ (https://node.green/)
|
||||||
|
// the only missing feature is Array.prototype.values
|
||||||
|
"lib": ["es2017"],
|
||||||
|
"target": "es2017",
|
||||||
|
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"declarationDir": "types",
|
"declarationDir": "types",
|
||||||
"noImplicitThis": true,
|
|
||||||
"noUnusedLocals": true,
|
|
||||||
"noUnusedParameters": true,
|
|
||||||
"noEmitOnError": true,
|
"noEmitOnError": true,
|
||||||
"lib": [
|
"noErrorTruncation": true,
|
||||||
"es5",
|
|
||||||
"es6",
|
// rollup takes care of these
|
||||||
"dom",
|
"module": "esnext",
|
||||||
"es2015"
|
|
||||||
],
|
|
||||||
"importHelpers": true,
|
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"baseUrl": ".",
|
"resolveJsonModule": true,
|
||||||
"paths": {
|
"allowSyntheticDefaultImports": true,
|
||||||
"svelte/internal": ["./src/runtime/internal/index"],
|
|
||||||
"svelte/easing": ["./src/runtime/easing/index"],
|
// TODO: error all the things
|
||||||
"svelte/motion": ["./src/runtime/motion/index"],
|
//"strict": true,
|
||||||
"svelte/store": ["./src/runtime/store/index"]
|
"noImplicitThis": true,
|
||||||
},
|
"noUnusedLocals": true,
|
||||||
"typeRoots": [
|
"noUnusedParameters": true
|
||||||
"node_modules/@types"
|
}
|
||||||
]
|
|
||||||
},
|
|
||||||
"include": [
|
|
||||||
"src/**/*"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in new issue