├── .eslintignore ├── .eslintrc.js ├── .github └── workflows │ └── ci.yml ├── .gitignore ├── .prettierrc.js ├── LICENSE ├── README.md ├── RELEASE_NOTES.md ├── __tests__ └── fakeTimers.test.ts ├── docs ├── assets │ ├── css │ │ └── main.css │ ├── images │ │ ├── icons.png │ │ ├── icons@2x.png │ │ ├── widgets.png │ │ └── widgets@2x.png │ └── js │ │ ├── main.js │ │ └── search.js ├── index.html └── modules.html ├── jest.config.js ├── package.json ├── src └── index.ts ├── tsconfig.json └── yarn.lock /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | docs 4 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | parser: "@typescript-eslint/parser", 3 | extends: [ 4 | "eslint:recommended", 5 | "plugin:import/errors", 6 | "plugin:import/typescript", 7 | "prettier", 8 | "prettier/@typescript-eslint", 9 | ], 10 | plugins: ["jest", "@typescript-eslint", "simple-import-sort", "import"], 11 | parserOptions: { 12 | ecmaVersion: 2018, 13 | sourceType: "module", 14 | }, 15 | env: { 16 | node: true, 17 | jest: true, 18 | es6: true, 19 | }, 20 | rules: { 21 | "@typescript-eslint/no-unused-vars": [ 22 | "error", 23 | { 24 | argsIgnorePattern: "^_", 25 | varsIgnorePattern: "^_", 26 | args: "after-used", 27 | ignoreRestSiblings: true, 28 | }, 29 | ], 30 | curly: "error", 31 | "no-else-return": 0, 32 | "no-return-assign": [2, "except-parens"], 33 | "no-underscore-dangle": 0, 34 | "jest/no-focused-tests": 2, 35 | "jest/no-identical-title": 2, 36 | camelcase: 0, 37 | "prefer-arrow-callback": [ 38 | "error", 39 | { 40 | allowNamedFunctions: true, 41 | }, 42 | ], 43 | "class-methods-use-this": 0, 44 | "no-restricted-syntax": 0, 45 | "no-param-reassign": [ 46 | "error", 47 | { 48 | props: false, 49 | }, 50 | ], 51 | 52 | "arrow-body-style": 0, 53 | "no-nested-ternary": 0, 54 | 55 | /* 56 | * simple-import-sort seems to be the most stable import sorting currently, 57 | * disable others 58 | */ 59 | "simple-import-sort/imports": "error", 60 | "simple-import-sort/exports": "error", 61 | "sort-imports": "off", 62 | "import/order": "off", 63 | 64 | "import/no-deprecated": "warn", 65 | "import/no-duplicates": "error", 66 | }, 67 | }; 68 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: [push, pull_request] 4 | 5 | env: 6 | CI: true 7 | 8 | jobs: 9 | test: 10 | runs-on: ubuntu-18.04 11 | 12 | strategy: 13 | matrix: 14 | node-version: [10.x, 12.x, 14.x] 15 | 16 | steps: 17 | - uses: actions/checkout@v1 18 | - name: Use Node.js ${{ matrix.node-version }} 19 | uses: actions/setup-node@v1 20 | with: 21 | node-version: ${{ matrix.node-version }} 22 | - run: yarn --frozen-lockfile 23 | - run: yarn jest --ci 24 | 25 | lint: 26 | runs-on: ubuntu-18.04 27 | 28 | steps: 29 | - uses: actions/checkout@v1 30 | - name: Use Node.js 14.x 31 | uses: actions/setup-node@v1 32 | with: 33 | node-version: 14.x 34 | - run: yarn --frozen-lockfile 35 | - run: yarn lint 36 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | 78 | # Next.js build output 79 | .next 80 | 81 | # Nuxt.js build / generate output 82 | .nuxt 83 | dist 84 | 85 | # Gatsby files 86 | .cache/ 87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 88 | # https://nextjs.org/blog/next-9-1#public-directory-support 89 | # public 90 | 91 | # vuepress build output 92 | .vuepress/dist 93 | 94 | # Serverless directories 95 | .serverless/ 96 | 97 | # FuseBox cache 98 | .fusebox/ 99 | 100 | # DynamoDB Local files 101 | .dynamodb/ 102 | 103 | # TernJS port file 104 | .tern-port 105 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | trailingComma: "all", 3 | proseWrap: "always", 4 | }; 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Graphile 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # jest-time-helpers 2 | 3 | Helpers you can use in tests that relate to the passage of time (i.e. code that 4 | involves `setTimeout`, `setInterval`, `new Date()`, `Date.now()`, etc.). Allows 5 | you to "set the clock" to a particular point in time, advancing any `setTimeout` 6 | or `setInterval` calls that need advancing at the same time. Makes it possible 7 | (even pleasant!) to test code that would normally be dependent on the passage of 8 | time, such as scheduled events. 9 | 10 | [Documentation](https://www.graphile.org/jest-time-helpers/). 11 | 12 | This helper library was born out of 13 | [adding cron functionality](https://github.com/graphile/worker/pull/163) to 14 | [Graphile Worker](https://github.com/graphile/worker) and needing a reliable way 15 | to test it. 16 | 17 | If you find this useful, please give it a star ⭐ 18 | 19 | ## Methods 20 | 21 | For [full documentation](https://www.graphile.org/jest-time-helpers/), please 22 | click the headers. The following acts as a quick-reference. 23 | 24 | ### [`setupFakeTimers()`](https://www.graphile.org/jest-time-helpers/modules.html#setupfaketimers) 25 | 26 | Import and call the `setupFakeTimers` helper at the top of your test file: 27 | 28 | ```js 29 | import { setupFakeTimers } from "jest-time-helpers"; 30 | const { setTime } = setupFakeTimers(); 31 | ``` 32 | 33 | Then inside your tests you can call `setTime(timestamp)` to pretend that the 34 | system time is the timestamp you gave. When you set the timestamp to a value 35 | after the previous timestamp, all timers (`setTimeout`, `setInterval`, etc) will 36 | be advanced by that amount, as well as the "clock". When you set the timestamp 37 | to a value before the previous timestamp, only the clock will be updated and no 38 | timeouts/intervals will be effected. 39 | 40 | Example: 41 | 42 | ```js 43 | const REFERENCE_TIMESTAMP = 950536800000; /* 14th February 2000, 2pm UTC */ 44 | 45 | test("new Date().toISOString() returns the expected timestamp", () => { 46 | setTime(REFERENCE_TIMESTAMP); 47 | // Note, time may have advanced a millisecond or two, so we can't be too precise 48 | expect(new Date().toISOString()).toMatch(/^2000-02-14T14:00:0.*Z$/); 49 | }); 50 | ``` 51 | 52 | ### [`sleep(ms: number)`](https://www.graphile.org/jest-time-helpers/modules.html#sleep) 53 | 54 | A trivial method that returns a promise that resolves after the given number of 55 | real-time milliseconds. The important part about this method (as opposed to one 56 | that you might write yourself) is that it is not inhibited or influenced by fake 57 | timers. 58 | 59 | ### [`sleepUntil(condition: () => void, maxDuration = 2000, pollInterval = 2)`](https://www.graphile.org/jest-time-helpers/modules.html#sleepuntil) 60 | 61 | Polls the `condition` callback every `pollInterval` milliseconds, and resolves 62 | success when `condition()` returns a truthy value. If `maxDuration` elapses 63 | before `condition()` returns true, returns a rejected promise. 64 | 65 | Useful for waiting on external actions without putting arbitrary sleeps in your 66 | code (e.g. waiting for a database record to be created). 67 | 68 | Like `sleep()`, it is not inhibited or influenced by fake timers. 69 | 70 | ## Constants 71 | 72 | - `SECOND` - number of milliseconds in a second 73 | - `MINUTE` - number of milliseconds in a minute 74 | - `HOUR` - number of milliseconds in a hour 75 | - `DAY` - number of milliseconds in a day 76 | - `WEEK` - number of milliseconds in a week 77 | 78 | ## Crowd-funded open-source software 79 | 80 | To help us develop software sustainably under the MIT license, we ask all 81 | individuals and businesses that use our software to help support its ongoing 82 | maintenance and development via sponsorship. 83 | 84 | ### [Click here to find out more about sponsors and sponsorship.](https://www.graphile.org/sponsor/) 85 | 86 | ## Development 87 | 88 | Checkout the repository, then run the following commands: 89 | 90 | ``` 91 | yarn 92 | yarn test 93 | ``` 94 | -------------------------------------------------------------------------------- /RELEASE_NOTES.md: -------------------------------------------------------------------------------- 1 | # Release notes 2 | 3 | ### v0.0.1 4 | 5 | Initial release. 6 | -------------------------------------------------------------------------------- /__tests__/fakeTimers.test.ts: -------------------------------------------------------------------------------- 1 | import { setupFakeTimers } from "../src"; 2 | 3 | const { setTime, realNow } = setupFakeTimers(); 4 | const REFERENCE_TIMESTAMP = 950536800000; /* 14th February 2000, 2pm UTC */ 5 | 6 | test("Date.now() starts at the right time", () => { 7 | const nowAccordingToDateNow = Date.now(); 8 | const nowAccordingRealNow = realNow(); 9 | const difference = Math.abs(nowAccordingRealNow - nowAccordingToDateNow); 10 | // Expect the difference between these two to be less than 10 milliseconds 11 | expect(difference).toBeLessThanOrEqual(10); 12 | }); 13 | 14 | test("Date.now() and +new Date() return the expected time when setTime is used", () => { 15 | setTime(REFERENCE_TIMESTAMP); 16 | const nowAccordingToDateNow = Date.now(); 17 | const nowAccordingToNewDate = +new Date(); 18 | const nowAccordingToRealNow = realNow(); 19 | 20 | // This is a check to make sure that realNow is giving a reasonable value 21 | expect(nowAccordingToRealNow).toBeGreaterThan( 22 | 1610623893028 /* 14th Jan 2021, 11:31am UTC */, 23 | ); 24 | 25 | const differenceDateNow = Math.abs( 26 | REFERENCE_TIMESTAMP - nowAccordingToDateNow, 27 | ); 28 | const differenceNewDate = Math.abs( 29 | REFERENCE_TIMESTAMP - nowAccordingToNewDate, 30 | ); 31 | // Expect the difference between these two to be less than 10 milliseconds 32 | expect(differenceDateNow).toBeLessThanOrEqual(10); 33 | expect(differenceNewDate).toBeLessThanOrEqual(10); 34 | }); 35 | 36 | test("new Date().toISOString() returns the expected timestamp when setTime is used", () => { 37 | setTime(REFERENCE_TIMESTAMP); 38 | expect(new Date().toISOString()).toMatch(/^2000-02-14T14:00:0.*Z$/); 39 | }); 40 | 41 | test("new Date(3000) returns the expected timestamp", () => { 42 | setTime(REFERENCE_TIMESTAMP); 43 | expect(new Date(3000).toISOString()).toMatch(/^1970-01-01T00:00:03.000Z$/); 44 | }); 45 | 46 | test("Advancing timers works as expected", () => { 47 | setTime(REFERENCE_TIMESTAMP); 48 | let called = false; 49 | setTimeout(() => { 50 | called = true; 51 | }, 1000); 52 | 53 | // Nothing's happened yet 54 | expect(called).toBe(false); 55 | 56 | // Advancing 500ms shouldn't be enough to call the timer 57 | setTime(REFERENCE_TIMESTAMP + 500); 58 | expect(called).toBe(false); 59 | 60 | // Advancing another 600ms should be enough for the 1000ms timer to be called 61 | setTime(REFERENCE_TIMESTAMP + 500 + 600); 62 | expect(called).toBe(true); 63 | }); 64 | 65 | test("Clock skew (going back in time) doesn't break timers", () => { 66 | setTime(REFERENCE_TIMESTAMP); 67 | let called = false; 68 | setTimeout(() => { 69 | called = true; 70 | }, 1000); 71 | 72 | // Nothing's happened yet 73 | expect(called).toBe(false); 74 | 75 | // Advancing 500ms shouldn't be enough to call the timer 76 | setTime(REFERENCE_TIMESTAMP + 500); 77 | expect(called).toBe(false); 78 | 79 | // R-r-r-r-rewind! 300ms 80 | // NOTE: rewinding the clock does **NOT** undo timer advancement, just like 81 | // setting the computer clock back a couple minutes does not undo all the 82 | // work that happened in the last 2 minutes. 83 | setTime(REFERENCE_TIMESTAMP + 500 - 300); 84 | expect(called).toBe(false); 85 | 86 | // Advancing 450ms from previous timestamp shouldn't be enough to call the timer (total advancement: 950ms) 87 | setTime(REFERENCE_TIMESTAMP + 500 - 300 + 450); 88 | expect(called).toBe(false); 89 | 90 | // Advancing another 100ms (total advancement: 1050ms) should be enough to call the timer 91 | setTime(REFERENCE_TIMESTAMP + 500 - 300 + 450 + 100); 92 | expect(called).toBe(true); 93 | }); 94 | -------------------------------------------------------------------------------- /docs/assets/css/main.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v1.1.3 | MIT License | git.io/normalize */ 2 | /* ========================================================================== 3 | * * HTML5 display definitions 4 | * * ========================================================================== */ 5 | /** 6 | * * Correct `block` display not defined in IE 6/7/8/9 and Firefox 3. */ 7 | article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary { 8 | display: block; 9 | } 10 | 11 | /** 12 | * * Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3. */ 13 | audio, canvas, video { 14 | display: inline-block; 15 | *display: inline; 16 | *zoom: 1; 17 | } 18 | 19 | /** 20 | * * Prevent modern browsers from displaying `audio` without controls. 21 | * * Remove excess height in iOS 5 devices. */ 22 | audio:not([controls]) { 23 | display: none; 24 | height: 0; 25 | } 26 | 27 | /** 28 | * * Address styling not present in IE 7/8/9, Firefox 3, and Safari 4. 29 | * * Known issue: no IE 6 support. */ 30 | [hidden] { 31 | display: none; 32 | } 33 | 34 | /* ========================================================================== 35 | * * Base 36 | * * ========================================================================== */ 37 | /** 38 | * * 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using 39 | * * `em` units. 40 | * * 2. Prevent iOS text size adjust after orientation change, without disabling 41 | * * user zoom. */ 42 | html { 43 | font-size: 100%; 44 | /* 1 */ 45 | -ms-text-size-adjust: 100%; 46 | /* 2 */ 47 | -webkit-text-size-adjust: 100%; 48 | /* 2 */ 49 | font-family: sans-serif; 50 | } 51 | 52 | /** 53 | * * Address `font-family` inconsistency between `textarea` and other form 54 | * * elements. */ 55 | button, input, select, textarea { 56 | font-family: sans-serif; 57 | } 58 | 59 | /** 60 | * * Address margins handled incorrectly in IE 6/7. */ 61 | body { 62 | margin: 0; 63 | } 64 | 65 | /* ========================================================================== 66 | * * Links 67 | * * ========================================================================== */ 68 | /** 69 | * * Address `outline` inconsistency between Chrome and other browsers. */ 70 | a:focus { 71 | outline: thin dotted; 72 | } 73 | a:active, a:hover { 74 | outline: 0; 75 | } 76 | 77 | /** 78 | * * Improve readability when focused and also mouse hovered in all browsers. */ 79 | /* ========================================================================== 80 | * * Typography 81 | * * ========================================================================== */ 82 | /** 83 | * * Address font sizes and margins set differently in IE 6/7. 84 | * * Address font sizes within `section` and `article` in Firefox 4+, Safari 5, 85 | * * and Chrome. */ 86 | h1 { 87 | font-size: 2em; 88 | margin: 0.67em 0; 89 | } 90 | 91 | h2 { 92 | font-size: 1.5em; 93 | margin: 0.83em 0; 94 | } 95 | 96 | h3 { 97 | font-size: 1.17em; 98 | margin: 1em 0; 99 | } 100 | 101 | h4, .tsd-index-panel h3 { 102 | font-size: 1em; 103 | margin: 1.33em 0; 104 | } 105 | 106 | h5 { 107 | font-size: 0.83em; 108 | margin: 1.67em 0; 109 | } 110 | 111 | h6 { 112 | font-size: 0.67em; 113 | margin: 2.33em 0; 114 | } 115 | 116 | /** 117 | * * Address styling not present in IE 7/8/9, Safari 5, and Chrome. */ 118 | abbr[title] { 119 | border-bottom: 1px dotted; 120 | } 121 | 122 | /** 123 | * * Address style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome. */ 124 | b, strong { 125 | font-weight: bold; 126 | } 127 | 128 | blockquote { 129 | margin: 1em 40px; 130 | } 131 | 132 | /** 133 | * * Address styling not present in Safari 5 and Chrome. */ 134 | dfn { 135 | font-style: italic; 136 | } 137 | 138 | /** 139 | * * Address differences between Firefox and other browsers. 140 | * * Known issue: no IE 6/7 normalization. */ 141 | hr { 142 | -moz-box-sizing: content-box; 143 | box-sizing: content-box; 144 | height: 0; 145 | } 146 | 147 | /** 148 | * * Address styling not present in IE 6/7/8/9. */ 149 | mark { 150 | background: #ff0; 151 | color: #000; 152 | } 153 | 154 | /** 155 | * * Address margins set differently in IE 6/7. */ 156 | p, pre { 157 | margin: 1em 0; 158 | } 159 | 160 | /** 161 | * * Correct font family set oddly in IE 6, Safari 4/5, and Chrome. */ 162 | code, kbd, pre, samp { 163 | font-family: monospace, serif; 164 | _font-family: "courier new", monospace; 165 | font-size: 1em; 166 | } 167 | 168 | /** 169 | * * Improve readability of pre-formatted text in all browsers. */ 170 | pre { 171 | white-space: pre; 172 | white-space: pre-wrap; 173 | word-wrap: break-word; 174 | } 175 | 176 | /** 177 | * * Address CSS quotes not supported in IE 6/7. */ 178 | q { 179 | quotes: none; 180 | } 181 | q:before, q:after { 182 | content: ""; 183 | content: none; 184 | } 185 | 186 | /** 187 | * * Address `quotes` property not supported in Safari 4. */ 188 | /** 189 | * * Address inconsistent and variable font size in all browsers. */ 190 | small { 191 | font-size: 80%; 192 | } 193 | 194 | /** 195 | * * Prevent `sub` and `sup` affecting `line-height` in all browsers. */ 196 | sub { 197 | font-size: 75%; 198 | line-height: 0; 199 | position: relative; 200 | vertical-align: baseline; 201 | } 202 | 203 | sup { 204 | font-size: 75%; 205 | line-height: 0; 206 | position: relative; 207 | vertical-align: baseline; 208 | top: -0.5em; 209 | } 210 | 211 | sub { 212 | bottom: -0.25em; 213 | } 214 | 215 | /* ========================================================================== 216 | * * Lists 217 | * * ========================================================================== */ 218 | /** 219 | * * Address margins set differently in IE 6/7. */ 220 | dl, menu, ol, ul { 221 | margin: 1em 0; 222 | } 223 | 224 | dd { 225 | margin: 0 0 0 40px; 226 | } 227 | 228 | /** 229 | * * Address paddings set differently in IE 6/7. */ 230 | menu, ol, ul { 231 | padding: 0 0 0 40px; 232 | } 233 | 234 | /** 235 | * * Correct list images handled incorrectly in IE 7. */ 236 | nav ul, nav ol { 237 | list-style: none; 238 | list-style-image: none; 239 | } 240 | 241 | /* ========================================================================== 242 | * * Embedded content 243 | * * ========================================================================== */ 244 | /** 245 | * * 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3. 246 | * * 2. Improve image quality when scaled in IE 7. */ 247 | img { 248 | border: 0; 249 | /* 1 */ 250 | -ms-interpolation-mode: bicubic; 251 | } 252 | 253 | /* 2 */ 254 | /** 255 | * * Correct overflow displayed oddly in IE 9. */ 256 | svg:not(:root) { 257 | overflow: hidden; 258 | } 259 | 260 | /* ========================================================================== 261 | * * Figures 262 | * * ========================================================================== */ 263 | /** 264 | * * Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11. */ 265 | figure, form { 266 | margin: 0; 267 | } 268 | 269 | /* ========================================================================== 270 | * * Forms 271 | * * ========================================================================== */ 272 | /** 273 | * * Correct margin displayed oddly in IE 6/7. */ 274 | /** 275 | * * Define consistent border, margin, and padding. */ 276 | fieldset { 277 | border: 1px solid #c0c0c0; 278 | margin: 0 2px; 279 | padding: 0.35em 0.625em 0.75em; 280 | } 281 | 282 | /** 283 | * * 1. Correct color not being inherited in IE 6/7/8/9. 284 | * * 2. Correct text not wrapping in Firefox 3. 285 | * * 3. Correct alignment displayed oddly in IE 6/7. */ 286 | legend { 287 | border: 0; 288 | /* 1 */ 289 | padding: 0; 290 | white-space: normal; 291 | /* 2 */ 292 | *margin-left: -7px; 293 | } 294 | 295 | /* 3 */ 296 | /** 297 | * * 1. Correct font size not being inherited in all browsers. 298 | * * 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5, 299 | * * and Chrome. 300 | * * 3. Improve appearance and consistency in all browsers. */ 301 | button, input, select, textarea { 302 | font-size: 100%; 303 | /* 1 */ 304 | margin: 0; 305 | /* 2 */ 306 | vertical-align: baseline; 307 | /* 3 */ 308 | *vertical-align: middle; 309 | } 310 | 311 | /* 3 */ 312 | /** 313 | * * Address Firefox 3+ setting `line-height` on `input` using `!important` in 314 | * * the UA stylesheet. */ 315 | button, input { 316 | line-height: normal; 317 | } 318 | 319 | /** 320 | * * Address inconsistent `text-transform` inheritance for `button` and `select`. 321 | * * All other form control elements do not inherit `text-transform` values. 322 | * * Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+. 323 | * * Correct `select` style inheritance in Firefox 4+ and Opera. */ 324 | button, select { 325 | text-transform: none; 326 | } 327 | 328 | /** 329 | * * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` 330 | * * and `video` controls. 331 | * * 2. Correct inability to style clickable `input` types in iOS. 332 | * * 3. Improve usability and consistency of cursor style between image-type 333 | * * `input` and others. 334 | * * 4. Remove inner spacing in IE 7 without affecting normal text inputs. 335 | * * Known issue: inner spacing remains in IE 6. */ 336 | button, html input[type=button] { 337 | -webkit-appearance: button; 338 | /* 2 */ 339 | cursor: pointer; 340 | /* 3 */ 341 | *overflow: visible; 342 | } 343 | 344 | /* 4 */ 345 | input[type=reset], input[type=submit] { 346 | -webkit-appearance: button; 347 | /* 2 */ 348 | cursor: pointer; 349 | /* 3 */ 350 | *overflow: visible; 351 | } 352 | 353 | /* 4 */ 354 | /** 355 | * * Re-set default cursor for disabled elements. */ 356 | button[disabled], html input[disabled] { 357 | cursor: default; 358 | } 359 | 360 | /** 361 | * * 1. Address box sizing set to content-box in IE 8/9. 362 | * * 2. Remove excess padding in IE 8/9. 363 | * * 3. Remove excess padding in IE 7. 364 | * * Known issue: excess padding remains in IE 6. */ 365 | input { 366 | /* 3 */ 367 | } 368 | input[type=checkbox], input[type=radio] { 369 | box-sizing: border-box; 370 | /* 1 */ 371 | padding: 0; 372 | /* 2 */ 373 | *height: 13px; 374 | /* 3 */ 375 | *width: 13px; 376 | } 377 | input[type=search] { 378 | -webkit-appearance: textfield; 379 | /* 1 */ 380 | -moz-box-sizing: content-box; 381 | -webkit-box-sizing: content-box; 382 | /* 2 */ 383 | box-sizing: content-box; 384 | } 385 | input[type=search]::-webkit-search-cancel-button, input[type=search]::-webkit-search-decoration { 386 | -webkit-appearance: none; 387 | } 388 | 389 | /** 390 | * * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. 391 | * * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome 392 | * * (include `-moz` to future-proof). */ 393 | /** 394 | * * Remove inner padding and search cancel button in Safari 5 and Chrome 395 | * * on OS X. */ 396 | /** 397 | * * Remove inner padding and border in Firefox 3+. */ 398 | button::-moz-focus-inner, input::-moz-focus-inner { 399 | border: 0; 400 | padding: 0; 401 | } 402 | 403 | /** 404 | * * 1. Remove default vertical scrollbar in IE 6/7/8/9. 405 | * * 2. Improve readability and alignment in all browsers. */ 406 | textarea { 407 | overflow: auto; 408 | /* 1 */ 409 | vertical-align: top; 410 | } 411 | 412 | /* 2 */ 413 | /* ========================================================================== 414 | * * Tables 415 | * * ========================================================================== */ 416 | /** 417 | * * Remove most spacing between table cells. */ 418 | table { 419 | border-collapse: collapse; 420 | border-spacing: 0; 421 | } 422 | 423 | ul.tsd-descriptions > li > :first-child, .tsd-panel > :first-child, .col > :first-child, .col-11 > :first-child, .col-10 > :first-child, .col-9 > :first-child, .col-8 > :first-child, .col-7 > :first-child, .col-6 > :first-child, .col-5 > :first-child, .col-4 > :first-child, .col-3 > :first-child, .col-2 > :first-child, .col-1 > :first-child, 424 | ul.tsd-descriptions > li > :first-child > :first-child, 425 | .tsd-panel > :first-child > :first-child, 426 | .col > :first-child > :first-child, 427 | .col-11 > :first-child > :first-child, 428 | .col-10 > :first-child > :first-child, 429 | .col-9 > :first-child > :first-child, 430 | .col-8 > :first-child > :first-child, 431 | .col-7 > :first-child > :first-child, 432 | .col-6 > :first-child > :first-child, 433 | .col-5 > :first-child > :first-child, 434 | .col-4 > :first-child > :first-child, 435 | .col-3 > :first-child > :first-child, 436 | .col-2 > :first-child > :first-child, 437 | .col-1 > :first-child > :first-child, 438 | ul.tsd-descriptions > li > :first-child > :first-child > :first-child, 439 | .tsd-panel > :first-child > :first-child > :first-child, 440 | .col > :first-child > :first-child > :first-child, 441 | .col-11 > :first-child > :first-child > :first-child, 442 | .col-10 > :first-child > :first-child > :first-child, 443 | .col-9 > :first-child > :first-child > :first-child, 444 | .col-8 > :first-child > :first-child > :first-child, 445 | .col-7 > :first-child > :first-child > :first-child, 446 | .col-6 > :first-child > :first-child > :first-child, 447 | .col-5 > :first-child > :first-child > :first-child, 448 | .col-4 > :first-child > :first-child > :first-child, 449 | .col-3 > :first-child > :first-child > :first-child, 450 | .col-2 > :first-child > :first-child > :first-child, 451 | .col-1 > :first-child > :first-child > :first-child { 452 | margin-top: 0; 453 | } 454 | ul.tsd-descriptions > li > :last-child, .tsd-panel > :last-child, .col > :last-child, .col-11 > :last-child, .col-10 > :last-child, .col-9 > :last-child, .col-8 > :last-child, .col-7 > :last-child, .col-6 > :last-child, .col-5 > :last-child, .col-4 > :last-child, .col-3 > :last-child, .col-2 > :last-child, .col-1 > :last-child, 455 | ul.tsd-descriptions > li > :last-child > :last-child, 456 | .tsd-panel > :last-child > :last-child, 457 | .col > :last-child > :last-child, 458 | .col-11 > :last-child > :last-child, 459 | .col-10 > :last-child > :last-child, 460 | .col-9 > :last-child > :last-child, 461 | .col-8 > :last-child > :last-child, 462 | .col-7 > :last-child > :last-child, 463 | .col-6 > :last-child > :last-child, 464 | .col-5 > :last-child > :last-child, 465 | .col-4 > :last-child > :last-child, 466 | .col-3 > :last-child > :last-child, 467 | .col-2 > :last-child > :last-child, 468 | .col-1 > :last-child > :last-child, 469 | ul.tsd-descriptions > li > :last-child > :last-child > :last-child, 470 | .tsd-panel > :last-child > :last-child > :last-child, 471 | .col > :last-child > :last-child > :last-child, 472 | .col-11 > :last-child > :last-child > :last-child, 473 | .col-10 > :last-child > :last-child > :last-child, 474 | .col-9 > :last-child > :last-child > :last-child, 475 | .col-8 > :last-child > :last-child > :last-child, 476 | .col-7 > :last-child > :last-child > :last-child, 477 | .col-6 > :last-child > :last-child > :last-child, 478 | .col-5 > :last-child > :last-child > :last-child, 479 | .col-4 > :last-child > :last-child > :last-child, 480 | .col-3 > :last-child > :last-child > :last-child, 481 | .col-2 > :last-child > :last-child > :last-child, 482 | .col-1 > :last-child > :last-child > :last-child { 483 | margin-bottom: 0; 484 | } 485 | 486 | .container { 487 | max-width: 1200px; 488 | margin: 0 auto; 489 | padding: 0 40px; 490 | } 491 | @media (max-width: 640px) { 492 | .container { 493 | padding: 0 20px; 494 | } 495 | } 496 | 497 | .container-main { 498 | padding-bottom: 200px; 499 | } 500 | 501 | .row { 502 | display: flex; 503 | position: relative; 504 | margin: 0 -10px; 505 | } 506 | .row:after { 507 | visibility: hidden; 508 | display: block; 509 | content: ""; 510 | clear: both; 511 | height: 0; 512 | } 513 | 514 | .col, .col-11, .col-10, .col-9, .col-8, .col-7, .col-6, .col-5, .col-4, .col-3, .col-2, .col-1 { 515 | box-sizing: border-box; 516 | float: left; 517 | padding: 0 10px; 518 | } 519 | 520 | .col-1 { 521 | width: 8.3333333333%; 522 | } 523 | 524 | .offset-1 { 525 | margin-left: 8.3333333333%; 526 | } 527 | 528 | .col-2 { 529 | width: 16.6666666667%; 530 | } 531 | 532 | .offset-2 { 533 | margin-left: 16.6666666667%; 534 | } 535 | 536 | .col-3 { 537 | width: 25%; 538 | } 539 | 540 | .offset-3 { 541 | margin-left: 25%; 542 | } 543 | 544 | .col-4 { 545 | width: 33.3333333333%; 546 | } 547 | 548 | .offset-4 { 549 | margin-left: 33.3333333333%; 550 | } 551 | 552 | .col-5 { 553 | width: 41.6666666667%; 554 | } 555 | 556 | .offset-5 { 557 | margin-left: 41.6666666667%; 558 | } 559 | 560 | .col-6 { 561 | width: 50%; 562 | } 563 | 564 | .offset-6 { 565 | margin-left: 50%; 566 | } 567 | 568 | .col-7 { 569 | width: 58.3333333333%; 570 | } 571 | 572 | .offset-7 { 573 | margin-left: 58.3333333333%; 574 | } 575 | 576 | .col-8 { 577 | width: 66.6666666667%; 578 | } 579 | 580 | .offset-8 { 581 | margin-left: 66.6666666667%; 582 | } 583 | 584 | .col-9 { 585 | width: 75%; 586 | } 587 | 588 | .offset-9 { 589 | margin-left: 75%; 590 | } 591 | 592 | .col-10 { 593 | width: 83.3333333333%; 594 | } 595 | 596 | .offset-10 { 597 | margin-left: 83.3333333333%; 598 | } 599 | 600 | .col-11 { 601 | width: 91.6666666667%; 602 | } 603 | 604 | .offset-11 { 605 | margin-left: 91.6666666667%; 606 | } 607 | 608 | .tsd-kind-icon { 609 | display: block; 610 | position: relative; 611 | padding-left: 20px; 612 | text-indent: -20px; 613 | } 614 | .tsd-kind-icon:before { 615 | content: ""; 616 | display: inline-block; 617 | vertical-align: middle; 618 | width: 17px; 619 | height: 17px; 620 | margin: 0 3px 2px 0; 621 | background-image: url(../images/icons.png); 622 | } 623 | @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) { 624 | .tsd-kind-icon:before { 625 | background-image: url(../images/icons@2x.png); 626 | background-size: 238px 204px; 627 | } 628 | } 629 | 630 | .tsd-signature.tsd-kind-icon:before { 631 | background-position: 0 -153px; 632 | } 633 | 634 | .tsd-kind-object-literal > .tsd-kind-icon:before { 635 | background-position: 0px -17px; 636 | } 637 | .tsd-kind-object-literal.tsd-is-protected > .tsd-kind-icon:before { 638 | background-position: -17px -17px; 639 | } 640 | .tsd-kind-object-literal.tsd-is-private > .tsd-kind-icon:before { 641 | background-position: -34px -17px; 642 | } 643 | 644 | .tsd-kind-class > .tsd-kind-icon:before { 645 | background-position: 0px -34px; 646 | } 647 | .tsd-kind-class.tsd-is-protected > .tsd-kind-icon:before { 648 | background-position: -17px -34px; 649 | } 650 | .tsd-kind-class.tsd-is-private > .tsd-kind-icon:before { 651 | background-position: -34px -34px; 652 | } 653 | 654 | .tsd-kind-class.tsd-has-type-parameter > .tsd-kind-icon:before { 655 | background-position: 0px -51px; 656 | } 657 | .tsd-kind-class.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { 658 | background-position: -17px -51px; 659 | } 660 | .tsd-kind-class.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { 661 | background-position: -34px -51px; 662 | } 663 | 664 | .tsd-kind-interface > .tsd-kind-icon:before { 665 | background-position: 0px -68px; 666 | } 667 | .tsd-kind-interface.tsd-is-protected > .tsd-kind-icon:before { 668 | background-position: -17px -68px; 669 | } 670 | .tsd-kind-interface.tsd-is-private > .tsd-kind-icon:before { 671 | background-position: -34px -68px; 672 | } 673 | 674 | .tsd-kind-interface.tsd-has-type-parameter > .tsd-kind-icon:before { 675 | background-position: 0px -85px; 676 | } 677 | .tsd-kind-interface.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { 678 | background-position: -17px -85px; 679 | } 680 | .tsd-kind-interface.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { 681 | background-position: -34px -85px; 682 | } 683 | 684 | .tsd-kind-namespace > .tsd-kind-icon:before { 685 | background-position: 0px -102px; 686 | } 687 | .tsd-kind-namespace.tsd-is-protected > .tsd-kind-icon:before { 688 | background-position: -17px -102px; 689 | } 690 | .tsd-kind-namespace.tsd-is-private > .tsd-kind-icon:before { 691 | background-position: -34px -102px; 692 | } 693 | 694 | .tsd-kind-module > .tsd-kind-icon:before { 695 | background-position: 0px -102px; 696 | } 697 | .tsd-kind-module.tsd-is-protected > .tsd-kind-icon:before { 698 | background-position: -17px -102px; 699 | } 700 | .tsd-kind-module.tsd-is-private > .tsd-kind-icon:before { 701 | background-position: -34px -102px; 702 | } 703 | 704 | .tsd-kind-enum > .tsd-kind-icon:before { 705 | background-position: 0px -119px; 706 | } 707 | .tsd-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 708 | background-position: -17px -119px; 709 | } 710 | .tsd-kind-enum.tsd-is-private > .tsd-kind-icon:before { 711 | background-position: -34px -119px; 712 | } 713 | 714 | .tsd-kind-enum-member > .tsd-kind-icon:before { 715 | background-position: 0px -136px; 716 | } 717 | .tsd-kind-enum-member.tsd-is-protected > .tsd-kind-icon:before { 718 | background-position: -17px -136px; 719 | } 720 | .tsd-kind-enum-member.tsd-is-private > .tsd-kind-icon:before { 721 | background-position: -34px -136px; 722 | } 723 | 724 | .tsd-kind-signature > .tsd-kind-icon:before { 725 | background-position: 0px -153px; 726 | } 727 | .tsd-kind-signature.tsd-is-protected > .tsd-kind-icon:before { 728 | background-position: -17px -153px; 729 | } 730 | .tsd-kind-signature.tsd-is-private > .tsd-kind-icon:before { 731 | background-position: -34px -153px; 732 | } 733 | 734 | .tsd-kind-type-alias > .tsd-kind-icon:before { 735 | background-position: 0px -170px; 736 | } 737 | .tsd-kind-type-alias.tsd-is-protected > .tsd-kind-icon:before { 738 | background-position: -17px -170px; 739 | } 740 | .tsd-kind-type-alias.tsd-is-private > .tsd-kind-icon:before { 741 | background-position: -34px -170px; 742 | } 743 | 744 | .tsd-kind-type-alias.tsd-has-type-parameter > .tsd-kind-icon:before { 745 | background-position: 0px -187px; 746 | } 747 | .tsd-kind-type-alias.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { 748 | background-position: -17px -187px; 749 | } 750 | .tsd-kind-type-alias.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { 751 | background-position: -34px -187px; 752 | } 753 | 754 | .tsd-kind-variable > .tsd-kind-icon:before { 755 | background-position: -136px -0px; 756 | } 757 | .tsd-kind-variable.tsd-is-protected > .tsd-kind-icon:before { 758 | background-position: -153px -0px; 759 | } 760 | .tsd-kind-variable.tsd-is-private > .tsd-kind-icon:before { 761 | background-position: -119px -0px; 762 | } 763 | .tsd-kind-variable.tsd-parent-kind-class > .tsd-kind-icon:before { 764 | background-position: -51px -0px; 765 | } 766 | .tsd-kind-variable.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 767 | background-position: -68px -0px; 768 | } 769 | .tsd-kind-variable.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 770 | background-position: -85px -0px; 771 | } 772 | .tsd-kind-variable.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 773 | background-position: -102px -0px; 774 | } 775 | .tsd-kind-variable.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 776 | background-position: -119px -0px; 777 | } 778 | .tsd-kind-variable.tsd-parent-kind-enum > .tsd-kind-icon:before { 779 | background-position: -170px -0px; 780 | } 781 | .tsd-kind-variable.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 782 | background-position: -187px -0px; 783 | } 784 | .tsd-kind-variable.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 785 | background-position: -119px -0px; 786 | } 787 | .tsd-kind-variable.tsd-parent-kind-interface > .tsd-kind-icon:before { 788 | background-position: -204px -0px; 789 | } 790 | .tsd-kind-variable.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 791 | background-position: -221px -0px; 792 | } 793 | 794 | .tsd-kind-property > .tsd-kind-icon:before { 795 | background-position: -136px -0px; 796 | } 797 | .tsd-kind-property.tsd-is-protected > .tsd-kind-icon:before { 798 | background-position: -153px -0px; 799 | } 800 | .tsd-kind-property.tsd-is-private > .tsd-kind-icon:before { 801 | background-position: -119px -0px; 802 | } 803 | .tsd-kind-property.tsd-parent-kind-class > .tsd-kind-icon:before { 804 | background-position: -51px -0px; 805 | } 806 | .tsd-kind-property.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 807 | background-position: -68px -0px; 808 | } 809 | .tsd-kind-property.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 810 | background-position: -85px -0px; 811 | } 812 | .tsd-kind-property.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 813 | background-position: -102px -0px; 814 | } 815 | .tsd-kind-property.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 816 | background-position: -119px -0px; 817 | } 818 | .tsd-kind-property.tsd-parent-kind-enum > .tsd-kind-icon:before { 819 | background-position: -170px -0px; 820 | } 821 | .tsd-kind-property.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 822 | background-position: -187px -0px; 823 | } 824 | .tsd-kind-property.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 825 | background-position: -119px -0px; 826 | } 827 | .tsd-kind-property.tsd-parent-kind-interface > .tsd-kind-icon:before { 828 | background-position: -204px -0px; 829 | } 830 | .tsd-kind-property.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 831 | background-position: -221px -0px; 832 | } 833 | 834 | .tsd-kind-get-signature > .tsd-kind-icon:before { 835 | background-position: -136px -17px; 836 | } 837 | .tsd-kind-get-signature.tsd-is-protected > .tsd-kind-icon:before { 838 | background-position: -153px -17px; 839 | } 840 | .tsd-kind-get-signature.tsd-is-private > .tsd-kind-icon:before { 841 | background-position: -119px -17px; 842 | } 843 | .tsd-kind-get-signature.tsd-parent-kind-class > .tsd-kind-icon:before { 844 | background-position: -51px -17px; 845 | } 846 | .tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 847 | background-position: -68px -17px; 848 | } 849 | .tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 850 | background-position: -85px -17px; 851 | } 852 | .tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 853 | background-position: -102px -17px; 854 | } 855 | .tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 856 | background-position: -119px -17px; 857 | } 858 | .tsd-kind-get-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { 859 | background-position: -170px -17px; 860 | } 861 | .tsd-kind-get-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 862 | background-position: -187px -17px; 863 | } 864 | .tsd-kind-get-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 865 | background-position: -119px -17px; 866 | } 867 | .tsd-kind-get-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { 868 | background-position: -204px -17px; 869 | } 870 | .tsd-kind-get-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 871 | background-position: -221px -17px; 872 | } 873 | 874 | .tsd-kind-set-signature > .tsd-kind-icon:before { 875 | background-position: -136px -34px; 876 | } 877 | .tsd-kind-set-signature.tsd-is-protected > .tsd-kind-icon:before { 878 | background-position: -153px -34px; 879 | } 880 | .tsd-kind-set-signature.tsd-is-private > .tsd-kind-icon:before { 881 | background-position: -119px -34px; 882 | } 883 | .tsd-kind-set-signature.tsd-parent-kind-class > .tsd-kind-icon:before { 884 | background-position: -51px -34px; 885 | } 886 | .tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 887 | background-position: -68px -34px; 888 | } 889 | .tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 890 | background-position: -85px -34px; 891 | } 892 | .tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 893 | background-position: -102px -34px; 894 | } 895 | .tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 896 | background-position: -119px -34px; 897 | } 898 | .tsd-kind-set-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { 899 | background-position: -170px -34px; 900 | } 901 | .tsd-kind-set-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 902 | background-position: -187px -34px; 903 | } 904 | .tsd-kind-set-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 905 | background-position: -119px -34px; 906 | } 907 | .tsd-kind-set-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { 908 | background-position: -204px -34px; 909 | } 910 | .tsd-kind-set-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 911 | background-position: -221px -34px; 912 | } 913 | 914 | .tsd-kind-accessor > .tsd-kind-icon:before { 915 | background-position: -136px -51px; 916 | } 917 | .tsd-kind-accessor.tsd-is-protected > .tsd-kind-icon:before { 918 | background-position: -153px -51px; 919 | } 920 | .tsd-kind-accessor.tsd-is-private > .tsd-kind-icon:before { 921 | background-position: -119px -51px; 922 | } 923 | .tsd-kind-accessor.tsd-parent-kind-class > .tsd-kind-icon:before { 924 | background-position: -51px -51px; 925 | } 926 | .tsd-kind-accessor.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 927 | background-position: -68px -51px; 928 | } 929 | .tsd-kind-accessor.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 930 | background-position: -85px -51px; 931 | } 932 | .tsd-kind-accessor.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 933 | background-position: -102px -51px; 934 | } 935 | .tsd-kind-accessor.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 936 | background-position: -119px -51px; 937 | } 938 | .tsd-kind-accessor.tsd-parent-kind-enum > .tsd-kind-icon:before { 939 | background-position: -170px -51px; 940 | } 941 | .tsd-kind-accessor.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 942 | background-position: -187px -51px; 943 | } 944 | .tsd-kind-accessor.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 945 | background-position: -119px -51px; 946 | } 947 | .tsd-kind-accessor.tsd-parent-kind-interface > .tsd-kind-icon:before { 948 | background-position: -204px -51px; 949 | } 950 | .tsd-kind-accessor.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 951 | background-position: -221px -51px; 952 | } 953 | 954 | .tsd-kind-function > .tsd-kind-icon:before { 955 | background-position: -136px -68px; 956 | } 957 | .tsd-kind-function.tsd-is-protected > .tsd-kind-icon:before { 958 | background-position: -153px -68px; 959 | } 960 | .tsd-kind-function.tsd-is-private > .tsd-kind-icon:before { 961 | background-position: -119px -68px; 962 | } 963 | .tsd-kind-function.tsd-parent-kind-class > .tsd-kind-icon:before { 964 | background-position: -51px -68px; 965 | } 966 | .tsd-kind-function.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 967 | background-position: -68px -68px; 968 | } 969 | .tsd-kind-function.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 970 | background-position: -85px -68px; 971 | } 972 | .tsd-kind-function.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 973 | background-position: -102px -68px; 974 | } 975 | .tsd-kind-function.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 976 | background-position: -119px -68px; 977 | } 978 | .tsd-kind-function.tsd-parent-kind-enum > .tsd-kind-icon:before { 979 | background-position: -170px -68px; 980 | } 981 | .tsd-kind-function.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 982 | background-position: -187px -68px; 983 | } 984 | .tsd-kind-function.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 985 | background-position: -119px -68px; 986 | } 987 | .tsd-kind-function.tsd-parent-kind-interface > .tsd-kind-icon:before { 988 | background-position: -204px -68px; 989 | } 990 | .tsd-kind-function.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 991 | background-position: -221px -68px; 992 | } 993 | 994 | .tsd-kind-method > .tsd-kind-icon:before { 995 | background-position: -136px -68px; 996 | } 997 | .tsd-kind-method.tsd-is-protected > .tsd-kind-icon:before { 998 | background-position: -153px -68px; 999 | } 1000 | .tsd-kind-method.tsd-is-private > .tsd-kind-icon:before { 1001 | background-position: -119px -68px; 1002 | } 1003 | .tsd-kind-method.tsd-parent-kind-class > .tsd-kind-icon:before { 1004 | background-position: -51px -68px; 1005 | } 1006 | .tsd-kind-method.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1007 | background-position: -68px -68px; 1008 | } 1009 | .tsd-kind-method.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1010 | background-position: -85px -68px; 1011 | } 1012 | .tsd-kind-method.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1013 | background-position: -102px -68px; 1014 | } 1015 | .tsd-kind-method.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1016 | background-position: -119px -68px; 1017 | } 1018 | .tsd-kind-method.tsd-parent-kind-enum > .tsd-kind-icon:before { 1019 | background-position: -170px -68px; 1020 | } 1021 | .tsd-kind-method.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1022 | background-position: -187px -68px; 1023 | } 1024 | .tsd-kind-method.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1025 | background-position: -119px -68px; 1026 | } 1027 | .tsd-kind-method.tsd-parent-kind-interface > .tsd-kind-icon:before { 1028 | background-position: -204px -68px; 1029 | } 1030 | .tsd-kind-method.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1031 | background-position: -221px -68px; 1032 | } 1033 | 1034 | .tsd-kind-call-signature > .tsd-kind-icon:before { 1035 | background-position: -136px -68px; 1036 | } 1037 | .tsd-kind-call-signature.tsd-is-protected > .tsd-kind-icon:before { 1038 | background-position: -153px -68px; 1039 | } 1040 | .tsd-kind-call-signature.tsd-is-private > .tsd-kind-icon:before { 1041 | background-position: -119px -68px; 1042 | } 1043 | .tsd-kind-call-signature.tsd-parent-kind-class > .tsd-kind-icon:before { 1044 | background-position: -51px -68px; 1045 | } 1046 | .tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1047 | background-position: -68px -68px; 1048 | } 1049 | .tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1050 | background-position: -85px -68px; 1051 | } 1052 | .tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1053 | background-position: -102px -68px; 1054 | } 1055 | .tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1056 | background-position: -119px -68px; 1057 | } 1058 | .tsd-kind-call-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { 1059 | background-position: -170px -68px; 1060 | } 1061 | .tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1062 | background-position: -187px -68px; 1063 | } 1064 | .tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1065 | background-position: -119px -68px; 1066 | } 1067 | .tsd-kind-call-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { 1068 | background-position: -204px -68px; 1069 | } 1070 | .tsd-kind-call-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1071 | background-position: -221px -68px; 1072 | } 1073 | 1074 | .tsd-kind-function.tsd-has-type-parameter > .tsd-kind-icon:before { 1075 | background-position: -136px -85px; 1076 | } 1077 | .tsd-kind-function.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { 1078 | background-position: -153px -85px; 1079 | } 1080 | .tsd-kind-function.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { 1081 | background-position: -119px -85px; 1082 | } 1083 | .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class > .tsd-kind-icon:before { 1084 | background-position: -51px -85px; 1085 | } 1086 | .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1087 | background-position: -68px -85px; 1088 | } 1089 | .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1090 | background-position: -85px -85px; 1091 | } 1092 | .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1093 | background-position: -102px -85px; 1094 | } 1095 | .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1096 | background-position: -119px -85px; 1097 | } 1098 | .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum > .tsd-kind-icon:before { 1099 | background-position: -170px -85px; 1100 | } 1101 | .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1102 | background-position: -187px -85px; 1103 | } 1104 | .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1105 | background-position: -119px -85px; 1106 | } 1107 | .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-interface > .tsd-kind-icon:before { 1108 | background-position: -204px -85px; 1109 | } 1110 | .tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1111 | background-position: -221px -85px; 1112 | } 1113 | 1114 | .tsd-kind-method.tsd-has-type-parameter > .tsd-kind-icon:before { 1115 | background-position: -136px -85px; 1116 | } 1117 | .tsd-kind-method.tsd-has-type-parameter.tsd-is-protected > .tsd-kind-icon:before { 1118 | background-position: -153px -85px; 1119 | } 1120 | .tsd-kind-method.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { 1121 | background-position: -119px -85px; 1122 | } 1123 | .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class > .tsd-kind-icon:before { 1124 | background-position: -51px -85px; 1125 | } 1126 | .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1127 | background-position: -68px -85px; 1128 | } 1129 | .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1130 | background-position: -85px -85px; 1131 | } 1132 | .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1133 | background-position: -102px -85px; 1134 | } 1135 | .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1136 | background-position: -119px -85px; 1137 | } 1138 | .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum > .tsd-kind-icon:before { 1139 | background-position: -170px -85px; 1140 | } 1141 | .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1142 | background-position: -187px -85px; 1143 | } 1144 | .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1145 | background-position: -119px -85px; 1146 | } 1147 | .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-interface > .tsd-kind-icon:before { 1148 | background-position: -204px -85px; 1149 | } 1150 | .tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1151 | background-position: -221px -85px; 1152 | } 1153 | 1154 | .tsd-kind-constructor > .tsd-kind-icon:before { 1155 | background-position: -136px -102px; 1156 | } 1157 | .tsd-kind-constructor.tsd-is-protected > .tsd-kind-icon:before { 1158 | background-position: -153px -102px; 1159 | } 1160 | .tsd-kind-constructor.tsd-is-private > .tsd-kind-icon:before { 1161 | background-position: -119px -102px; 1162 | } 1163 | .tsd-kind-constructor.tsd-parent-kind-class > .tsd-kind-icon:before { 1164 | background-position: -51px -102px; 1165 | } 1166 | .tsd-kind-constructor.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1167 | background-position: -68px -102px; 1168 | } 1169 | .tsd-kind-constructor.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1170 | background-position: -85px -102px; 1171 | } 1172 | .tsd-kind-constructor.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1173 | background-position: -102px -102px; 1174 | } 1175 | .tsd-kind-constructor.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1176 | background-position: -119px -102px; 1177 | } 1178 | .tsd-kind-constructor.tsd-parent-kind-enum > .tsd-kind-icon:before { 1179 | background-position: -170px -102px; 1180 | } 1181 | .tsd-kind-constructor.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1182 | background-position: -187px -102px; 1183 | } 1184 | .tsd-kind-constructor.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1185 | background-position: -119px -102px; 1186 | } 1187 | .tsd-kind-constructor.tsd-parent-kind-interface > .tsd-kind-icon:before { 1188 | background-position: -204px -102px; 1189 | } 1190 | .tsd-kind-constructor.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1191 | background-position: -221px -102px; 1192 | } 1193 | 1194 | .tsd-kind-constructor-signature > .tsd-kind-icon:before { 1195 | background-position: -136px -102px; 1196 | } 1197 | .tsd-kind-constructor-signature.tsd-is-protected > .tsd-kind-icon:before { 1198 | background-position: -153px -102px; 1199 | } 1200 | .tsd-kind-constructor-signature.tsd-is-private > .tsd-kind-icon:before { 1201 | background-position: -119px -102px; 1202 | } 1203 | .tsd-kind-constructor-signature.tsd-parent-kind-class > .tsd-kind-icon:before { 1204 | background-position: -51px -102px; 1205 | } 1206 | .tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1207 | background-position: -68px -102px; 1208 | } 1209 | .tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1210 | background-position: -85px -102px; 1211 | } 1212 | .tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1213 | background-position: -102px -102px; 1214 | } 1215 | .tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1216 | background-position: -119px -102px; 1217 | } 1218 | .tsd-kind-constructor-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { 1219 | background-position: -170px -102px; 1220 | } 1221 | .tsd-kind-constructor-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1222 | background-position: -187px -102px; 1223 | } 1224 | .tsd-kind-constructor-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1225 | background-position: -119px -102px; 1226 | } 1227 | .tsd-kind-constructor-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { 1228 | background-position: -204px -102px; 1229 | } 1230 | .tsd-kind-constructor-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1231 | background-position: -221px -102px; 1232 | } 1233 | 1234 | .tsd-kind-index-signature > .tsd-kind-icon:before { 1235 | background-position: -136px -119px; 1236 | } 1237 | .tsd-kind-index-signature.tsd-is-protected > .tsd-kind-icon:before { 1238 | background-position: -153px -119px; 1239 | } 1240 | .tsd-kind-index-signature.tsd-is-private > .tsd-kind-icon:before { 1241 | background-position: -119px -119px; 1242 | } 1243 | .tsd-kind-index-signature.tsd-parent-kind-class > .tsd-kind-icon:before { 1244 | background-position: -51px -119px; 1245 | } 1246 | .tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1247 | background-position: -68px -119px; 1248 | } 1249 | .tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1250 | background-position: -85px -119px; 1251 | } 1252 | .tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1253 | background-position: -102px -119px; 1254 | } 1255 | .tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1256 | background-position: -119px -119px; 1257 | } 1258 | .tsd-kind-index-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { 1259 | background-position: -170px -119px; 1260 | } 1261 | .tsd-kind-index-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1262 | background-position: -187px -119px; 1263 | } 1264 | .tsd-kind-index-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1265 | background-position: -119px -119px; 1266 | } 1267 | .tsd-kind-index-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { 1268 | background-position: -204px -119px; 1269 | } 1270 | .tsd-kind-index-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1271 | background-position: -221px -119px; 1272 | } 1273 | 1274 | .tsd-kind-event > .tsd-kind-icon:before { 1275 | background-position: -136px -136px; 1276 | } 1277 | .tsd-kind-event.tsd-is-protected > .tsd-kind-icon:before { 1278 | background-position: -153px -136px; 1279 | } 1280 | .tsd-kind-event.tsd-is-private > .tsd-kind-icon:before { 1281 | background-position: -119px -136px; 1282 | } 1283 | .tsd-kind-event.tsd-parent-kind-class > .tsd-kind-icon:before { 1284 | background-position: -51px -136px; 1285 | } 1286 | .tsd-kind-event.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1287 | background-position: -68px -136px; 1288 | } 1289 | .tsd-kind-event.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1290 | background-position: -85px -136px; 1291 | } 1292 | .tsd-kind-event.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1293 | background-position: -102px -136px; 1294 | } 1295 | .tsd-kind-event.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1296 | background-position: -119px -136px; 1297 | } 1298 | .tsd-kind-event.tsd-parent-kind-enum > .tsd-kind-icon:before { 1299 | background-position: -170px -136px; 1300 | } 1301 | .tsd-kind-event.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1302 | background-position: -187px -136px; 1303 | } 1304 | .tsd-kind-event.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1305 | background-position: -119px -136px; 1306 | } 1307 | .tsd-kind-event.tsd-parent-kind-interface > .tsd-kind-icon:before { 1308 | background-position: -204px -136px; 1309 | } 1310 | .tsd-kind-event.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1311 | background-position: -221px -136px; 1312 | } 1313 | 1314 | .tsd-is-static > .tsd-kind-icon:before { 1315 | background-position: -136px -153px; 1316 | } 1317 | .tsd-is-static.tsd-is-protected > .tsd-kind-icon:before { 1318 | background-position: -153px -153px; 1319 | } 1320 | .tsd-is-static.tsd-is-private > .tsd-kind-icon:before { 1321 | background-position: -119px -153px; 1322 | } 1323 | .tsd-is-static.tsd-parent-kind-class > .tsd-kind-icon:before { 1324 | background-position: -51px -153px; 1325 | } 1326 | .tsd-is-static.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1327 | background-position: -68px -153px; 1328 | } 1329 | .tsd-is-static.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1330 | background-position: -85px -153px; 1331 | } 1332 | .tsd-is-static.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1333 | background-position: -102px -153px; 1334 | } 1335 | .tsd-is-static.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1336 | background-position: -119px -153px; 1337 | } 1338 | .tsd-is-static.tsd-parent-kind-enum > .tsd-kind-icon:before { 1339 | background-position: -170px -153px; 1340 | } 1341 | .tsd-is-static.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1342 | background-position: -187px -153px; 1343 | } 1344 | .tsd-is-static.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1345 | background-position: -119px -153px; 1346 | } 1347 | .tsd-is-static.tsd-parent-kind-interface > .tsd-kind-icon:before { 1348 | background-position: -204px -153px; 1349 | } 1350 | .tsd-is-static.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1351 | background-position: -221px -153px; 1352 | } 1353 | 1354 | .tsd-is-static.tsd-kind-function > .tsd-kind-icon:before { 1355 | background-position: -136px -170px; 1356 | } 1357 | .tsd-is-static.tsd-kind-function.tsd-is-protected > .tsd-kind-icon:before { 1358 | background-position: -153px -170px; 1359 | } 1360 | .tsd-is-static.tsd-kind-function.tsd-is-private > .tsd-kind-icon:before { 1361 | background-position: -119px -170px; 1362 | } 1363 | .tsd-is-static.tsd-kind-function.tsd-parent-kind-class > .tsd-kind-icon:before { 1364 | background-position: -51px -170px; 1365 | } 1366 | .tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1367 | background-position: -68px -170px; 1368 | } 1369 | .tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1370 | background-position: -85px -170px; 1371 | } 1372 | .tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1373 | background-position: -102px -170px; 1374 | } 1375 | .tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1376 | background-position: -119px -170px; 1377 | } 1378 | .tsd-is-static.tsd-kind-function.tsd-parent-kind-enum > .tsd-kind-icon:before { 1379 | background-position: -170px -170px; 1380 | } 1381 | .tsd-is-static.tsd-kind-function.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1382 | background-position: -187px -170px; 1383 | } 1384 | .tsd-is-static.tsd-kind-function.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1385 | background-position: -119px -170px; 1386 | } 1387 | .tsd-is-static.tsd-kind-function.tsd-parent-kind-interface > .tsd-kind-icon:before { 1388 | background-position: -204px -170px; 1389 | } 1390 | .tsd-is-static.tsd-kind-function.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1391 | background-position: -221px -170px; 1392 | } 1393 | 1394 | .tsd-is-static.tsd-kind-method > .tsd-kind-icon:before { 1395 | background-position: -136px -170px; 1396 | } 1397 | .tsd-is-static.tsd-kind-method.tsd-is-protected > .tsd-kind-icon:before { 1398 | background-position: -153px -170px; 1399 | } 1400 | .tsd-is-static.tsd-kind-method.tsd-is-private > .tsd-kind-icon:before { 1401 | background-position: -119px -170px; 1402 | } 1403 | .tsd-is-static.tsd-kind-method.tsd-parent-kind-class > .tsd-kind-icon:before { 1404 | background-position: -51px -170px; 1405 | } 1406 | .tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1407 | background-position: -68px -170px; 1408 | } 1409 | .tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1410 | background-position: -85px -170px; 1411 | } 1412 | .tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1413 | background-position: -102px -170px; 1414 | } 1415 | .tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1416 | background-position: -119px -170px; 1417 | } 1418 | .tsd-is-static.tsd-kind-method.tsd-parent-kind-enum > .tsd-kind-icon:before { 1419 | background-position: -170px -170px; 1420 | } 1421 | .tsd-is-static.tsd-kind-method.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1422 | background-position: -187px -170px; 1423 | } 1424 | .tsd-is-static.tsd-kind-method.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1425 | background-position: -119px -170px; 1426 | } 1427 | .tsd-is-static.tsd-kind-method.tsd-parent-kind-interface > .tsd-kind-icon:before { 1428 | background-position: -204px -170px; 1429 | } 1430 | .tsd-is-static.tsd-kind-method.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1431 | background-position: -221px -170px; 1432 | } 1433 | 1434 | .tsd-is-static.tsd-kind-call-signature > .tsd-kind-icon:before { 1435 | background-position: -136px -170px; 1436 | } 1437 | .tsd-is-static.tsd-kind-call-signature.tsd-is-protected > .tsd-kind-icon:before { 1438 | background-position: -153px -170px; 1439 | } 1440 | .tsd-is-static.tsd-kind-call-signature.tsd-is-private > .tsd-kind-icon:before { 1441 | background-position: -119px -170px; 1442 | } 1443 | .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class > .tsd-kind-icon:before { 1444 | background-position: -51px -170px; 1445 | } 1446 | .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1447 | background-position: -68px -170px; 1448 | } 1449 | .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1450 | background-position: -85px -170px; 1451 | } 1452 | .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1453 | background-position: -102px -170px; 1454 | } 1455 | .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1456 | background-position: -119px -170px; 1457 | } 1458 | .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { 1459 | background-position: -170px -170px; 1460 | } 1461 | .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1462 | background-position: -187px -170px; 1463 | } 1464 | .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1465 | background-position: -119px -170px; 1466 | } 1467 | .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { 1468 | background-position: -204px -170px; 1469 | } 1470 | .tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1471 | background-position: -221px -170px; 1472 | } 1473 | 1474 | .tsd-is-static.tsd-kind-event > .tsd-kind-icon:before { 1475 | background-position: -136px -187px; 1476 | } 1477 | .tsd-is-static.tsd-kind-event.tsd-is-protected > .tsd-kind-icon:before { 1478 | background-position: -153px -187px; 1479 | } 1480 | .tsd-is-static.tsd-kind-event.tsd-is-private > .tsd-kind-icon:before { 1481 | background-position: -119px -187px; 1482 | } 1483 | .tsd-is-static.tsd-kind-event.tsd-parent-kind-class > .tsd-kind-icon:before { 1484 | background-position: -51px -187px; 1485 | } 1486 | .tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { 1487 | background-position: -68px -187px; 1488 | } 1489 | .tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { 1490 | background-position: -85px -187px; 1491 | } 1492 | .tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited > .tsd-kind-icon:before { 1493 | background-position: -102px -187px; 1494 | } 1495 | .tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { 1496 | background-position: -119px -187px; 1497 | } 1498 | .tsd-is-static.tsd-kind-event.tsd-parent-kind-enum > .tsd-kind-icon:before { 1499 | background-position: -170px -187px; 1500 | } 1501 | .tsd-is-static.tsd-kind-event.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { 1502 | background-position: -187px -187px; 1503 | } 1504 | .tsd-is-static.tsd-kind-event.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { 1505 | background-position: -119px -187px; 1506 | } 1507 | .tsd-is-static.tsd-kind-event.tsd-parent-kind-interface > .tsd-kind-icon:before { 1508 | background-position: -204px -187px; 1509 | } 1510 | .tsd-is-static.tsd-kind-event.tsd-parent-kind-interface.tsd-is-inherited > .tsd-kind-icon:before { 1511 | background-position: -221px -187px; 1512 | } 1513 | 1514 | @keyframes fade-in { 1515 | from { 1516 | opacity: 0; 1517 | } 1518 | to { 1519 | opacity: 1; 1520 | } 1521 | } 1522 | @keyframes fade-out { 1523 | from { 1524 | opacity: 1; 1525 | visibility: visible; 1526 | } 1527 | to { 1528 | opacity: 0; 1529 | } 1530 | } 1531 | @keyframes fade-in-delayed { 1532 | 0% { 1533 | opacity: 0; 1534 | } 1535 | 33% { 1536 | opacity: 0; 1537 | } 1538 | 100% { 1539 | opacity: 1; 1540 | } 1541 | } 1542 | @keyframes fade-out-delayed { 1543 | 0% { 1544 | opacity: 1; 1545 | visibility: visible; 1546 | } 1547 | 66% { 1548 | opacity: 0; 1549 | } 1550 | 100% { 1551 | opacity: 0; 1552 | } 1553 | } 1554 | @keyframes shift-to-left { 1555 | from { 1556 | transform: translate(0, 0); 1557 | } 1558 | to { 1559 | transform: translate(-25%, 0); 1560 | } 1561 | } 1562 | @keyframes unshift-to-left { 1563 | from { 1564 | transform: translate(-25%, 0); 1565 | } 1566 | to { 1567 | transform: translate(0, 0); 1568 | } 1569 | } 1570 | @keyframes pop-in-from-right { 1571 | from { 1572 | transform: translate(100%, 0); 1573 | } 1574 | to { 1575 | transform: translate(0, 0); 1576 | } 1577 | } 1578 | @keyframes pop-out-to-right { 1579 | from { 1580 | transform: translate(0, 0); 1581 | visibility: visible; 1582 | } 1583 | to { 1584 | transform: translate(100%, 0); 1585 | } 1586 | } 1587 | body { 1588 | background: #fdfdfd; 1589 | font-family: "Segoe UI", sans-serif; 1590 | font-size: 16px; 1591 | color: #222; 1592 | } 1593 | 1594 | a { 1595 | color: #4da6ff; 1596 | text-decoration: none; 1597 | } 1598 | a:hover { 1599 | text-decoration: underline; 1600 | } 1601 | 1602 | code, pre { 1603 | font-family: Menlo, Monaco, Consolas, "Courier New", monospace; 1604 | padding: 0.2em; 1605 | margin: 0; 1606 | font-size: 14px; 1607 | background-color: rgba(0, 0, 0, 0.04); 1608 | } 1609 | 1610 | pre { 1611 | padding: 10px; 1612 | } 1613 | pre code { 1614 | padding: 0; 1615 | font-size: 100%; 1616 | background-color: transparent; 1617 | } 1618 | 1619 | .tsd-typography { 1620 | line-height: 1.333em; 1621 | } 1622 | .tsd-typography ul { 1623 | list-style: square; 1624 | padding: 0 0 0 20px; 1625 | margin: 0; 1626 | } 1627 | .tsd-typography h4, .tsd-typography .tsd-index-panel h3, .tsd-index-panel .tsd-typography h3, .tsd-typography h5, .tsd-typography h6 { 1628 | font-size: 1em; 1629 | margin: 0; 1630 | } 1631 | .tsd-typography h5, .tsd-typography h6 { 1632 | font-weight: normal; 1633 | } 1634 | .tsd-typography p, .tsd-typography ul, .tsd-typography ol { 1635 | margin: 1em 0; 1636 | } 1637 | 1638 | @media (min-width: 901px) and (max-width: 1024px) { 1639 | html.default .col-content { 1640 | width: 72%; 1641 | } 1642 | html.default .col-menu { 1643 | width: 28%; 1644 | } 1645 | html.default .tsd-navigation { 1646 | padding-left: 10px; 1647 | } 1648 | } 1649 | @media (max-width: 900px) { 1650 | html.default .col-content { 1651 | float: none; 1652 | width: 100%; 1653 | } 1654 | html.default .col-menu { 1655 | position: fixed !important; 1656 | overflow: auto; 1657 | -webkit-overflow-scrolling: touch; 1658 | z-index: 1024; 1659 | top: 0 !important; 1660 | bottom: 0 !important; 1661 | left: auto !important; 1662 | right: 0 !important; 1663 | width: 100%; 1664 | padding: 20px 20px 0 0; 1665 | max-width: 450px; 1666 | visibility: hidden; 1667 | background-color: #fff; 1668 | transform: translate(100%, 0); 1669 | } 1670 | html.default .col-menu > *:last-child { 1671 | padding-bottom: 20px; 1672 | } 1673 | html.default .overlay { 1674 | content: ""; 1675 | display: block; 1676 | position: fixed; 1677 | z-index: 1023; 1678 | top: 0; 1679 | left: 0; 1680 | right: 0; 1681 | bottom: 0; 1682 | background-color: rgba(0, 0, 0, 0.75); 1683 | visibility: hidden; 1684 | } 1685 | html.default.to-has-menu .overlay { 1686 | animation: fade-in 0.4s; 1687 | } 1688 | html.default.to-has-menu header, 1689 | html.default.to-has-menu footer, 1690 | html.default.to-has-menu .col-content { 1691 | animation: shift-to-left 0.4s; 1692 | } 1693 | html.default.to-has-menu .col-menu { 1694 | animation: pop-in-from-right 0.4s; 1695 | } 1696 | html.default.from-has-menu .overlay { 1697 | animation: fade-out 0.4s; 1698 | } 1699 | html.default.from-has-menu header, 1700 | html.default.from-has-menu footer, 1701 | html.default.from-has-menu .col-content { 1702 | animation: unshift-to-left 0.4s; 1703 | } 1704 | html.default.from-has-menu .col-menu { 1705 | animation: pop-out-to-right 0.4s; 1706 | } 1707 | html.default.has-menu body { 1708 | overflow: hidden; 1709 | } 1710 | html.default.has-menu .overlay { 1711 | visibility: visible; 1712 | } 1713 | html.default.has-menu header, 1714 | html.default.has-menu footer, 1715 | html.default.has-menu .col-content { 1716 | transform: translate(-25%, 0); 1717 | } 1718 | html.default.has-menu .col-menu { 1719 | visibility: visible; 1720 | transform: translate(0, 0); 1721 | } 1722 | } 1723 | 1724 | .tsd-page-title { 1725 | padding: 70px 0 20px 0; 1726 | margin: 0 0 40px 0; 1727 | background: #fff; 1728 | box-shadow: 0 0 5px rgba(0, 0, 0, 0.35); 1729 | } 1730 | .tsd-page-title h1 { 1731 | margin: 0; 1732 | } 1733 | 1734 | .tsd-breadcrumb { 1735 | margin: 0; 1736 | padding: 0; 1737 | color: #707070; 1738 | } 1739 | .tsd-breadcrumb a { 1740 | color: #707070; 1741 | text-decoration: none; 1742 | } 1743 | .tsd-breadcrumb a:hover { 1744 | text-decoration: underline; 1745 | } 1746 | .tsd-breadcrumb li { 1747 | display: inline; 1748 | } 1749 | .tsd-breadcrumb li:after { 1750 | content: " / "; 1751 | } 1752 | 1753 | html.minimal .container { 1754 | margin: 0; 1755 | } 1756 | html.minimal .container-main { 1757 | padding-top: 50px; 1758 | padding-bottom: 0; 1759 | } 1760 | html.minimal .content-wrap { 1761 | padding-left: 300px; 1762 | } 1763 | html.minimal .tsd-navigation { 1764 | position: fixed !important; 1765 | overflow: auto; 1766 | -webkit-overflow-scrolling: touch; 1767 | box-sizing: border-box; 1768 | z-index: 1; 1769 | left: 0; 1770 | top: 40px; 1771 | bottom: 0; 1772 | width: 300px; 1773 | padding: 20px; 1774 | margin: 0; 1775 | } 1776 | html.minimal .tsd-member .tsd-member { 1777 | margin-left: 0; 1778 | } 1779 | html.minimal .tsd-page-toolbar { 1780 | position: fixed; 1781 | z-index: 2; 1782 | } 1783 | html.minimal #tsd-filter .tsd-filter-group { 1784 | right: 0; 1785 | transform: none; 1786 | } 1787 | html.minimal footer { 1788 | background-color: transparent; 1789 | } 1790 | html.minimal footer .container { 1791 | padding: 0; 1792 | } 1793 | html.minimal .tsd-generator { 1794 | padding: 0; 1795 | } 1796 | @media (max-width: 900px) { 1797 | html.minimal .tsd-navigation { 1798 | display: none; 1799 | } 1800 | html.minimal .content-wrap { 1801 | padding-left: 0; 1802 | } 1803 | } 1804 | 1805 | dl.tsd-comment-tags { 1806 | overflow: hidden; 1807 | } 1808 | dl.tsd-comment-tags dt { 1809 | float: left; 1810 | padding: 1px 5px; 1811 | margin: 0 10px 0 0; 1812 | border-radius: 4px; 1813 | border: 1px solid #707070; 1814 | color: #707070; 1815 | font-size: 0.8em; 1816 | font-weight: normal; 1817 | } 1818 | dl.tsd-comment-tags dd { 1819 | margin: 0 0 10px 0; 1820 | } 1821 | dl.tsd-comment-tags dd:before, dl.tsd-comment-tags dd:after { 1822 | display: table; 1823 | content: " "; 1824 | } 1825 | dl.tsd-comment-tags dd pre, dl.tsd-comment-tags dd:after { 1826 | clear: both; 1827 | } 1828 | dl.tsd-comment-tags p { 1829 | margin: 0; 1830 | } 1831 | 1832 | .tsd-panel.tsd-comment .lead { 1833 | font-size: 1.1em; 1834 | line-height: 1.333em; 1835 | margin-bottom: 2em; 1836 | } 1837 | .tsd-panel.tsd-comment .lead:last-child { 1838 | margin-bottom: 0; 1839 | } 1840 | 1841 | .toggle-protected .tsd-is-private { 1842 | display: none; 1843 | } 1844 | 1845 | .toggle-public .tsd-is-private, 1846 | .toggle-public .tsd-is-protected, 1847 | .toggle-public .tsd-is-private-protected { 1848 | display: none; 1849 | } 1850 | 1851 | .toggle-inherited .tsd-is-inherited { 1852 | display: none; 1853 | } 1854 | 1855 | .toggle-externals .tsd-is-external { 1856 | display: none; 1857 | } 1858 | 1859 | #tsd-filter { 1860 | position: relative; 1861 | display: inline-block; 1862 | height: 40px; 1863 | vertical-align: bottom; 1864 | } 1865 | .no-filter #tsd-filter { 1866 | display: none; 1867 | } 1868 | #tsd-filter .tsd-filter-group { 1869 | display: inline-block; 1870 | height: 40px; 1871 | vertical-align: bottom; 1872 | white-space: nowrap; 1873 | } 1874 | #tsd-filter input { 1875 | display: none; 1876 | } 1877 | @media (max-width: 900px) { 1878 | #tsd-filter .tsd-filter-group { 1879 | display: block; 1880 | position: absolute; 1881 | top: 40px; 1882 | right: 20px; 1883 | height: auto; 1884 | background-color: #fff; 1885 | visibility: hidden; 1886 | transform: translate(50%, 0); 1887 | box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); 1888 | } 1889 | .has-options #tsd-filter .tsd-filter-group { 1890 | visibility: visible; 1891 | } 1892 | .to-has-options #tsd-filter .tsd-filter-group { 1893 | animation: fade-in 0.2s; 1894 | } 1895 | .from-has-options #tsd-filter .tsd-filter-group { 1896 | animation: fade-out 0.2s; 1897 | } 1898 | #tsd-filter label, 1899 | #tsd-filter .tsd-select { 1900 | display: block; 1901 | padding-right: 20px; 1902 | } 1903 | } 1904 | 1905 | footer { 1906 | border-top: 1px solid #eee; 1907 | background-color: #fff; 1908 | } 1909 | footer.with-border-bottom { 1910 | border-bottom: 1px solid #eee; 1911 | } 1912 | footer .tsd-legend-group { 1913 | font-size: 0; 1914 | } 1915 | footer .tsd-legend { 1916 | display: inline-block; 1917 | width: 25%; 1918 | padding: 0; 1919 | font-size: 16px; 1920 | list-style: none; 1921 | line-height: 1.333em; 1922 | vertical-align: top; 1923 | } 1924 | @media (max-width: 900px) { 1925 | footer .tsd-legend { 1926 | width: 50%; 1927 | } 1928 | } 1929 | 1930 | .tsd-hierarchy { 1931 | list-style: square; 1932 | padding: 0 0 0 20px; 1933 | margin: 0; 1934 | } 1935 | .tsd-hierarchy .target { 1936 | font-weight: bold; 1937 | } 1938 | 1939 | .tsd-index-panel .tsd-index-content { 1940 | margin-bottom: -30px !important; 1941 | } 1942 | .tsd-index-panel .tsd-index-section { 1943 | margin-bottom: 30px !important; 1944 | } 1945 | .tsd-index-panel h3 { 1946 | margin: 0 -20px 10px -20px; 1947 | padding: 0 20px 10px 20px; 1948 | border-bottom: 1px solid #eee; 1949 | } 1950 | .tsd-index-panel ul.tsd-index-list { 1951 | -webkit-column-count: 3; 1952 | -moz-column-count: 3; 1953 | -ms-column-count: 3; 1954 | -o-column-count: 3; 1955 | column-count: 3; 1956 | -webkit-column-gap: 20px; 1957 | -moz-column-gap: 20px; 1958 | -ms-column-gap: 20px; 1959 | -o-column-gap: 20px; 1960 | column-gap: 20px; 1961 | padding: 0; 1962 | list-style: none; 1963 | line-height: 1.333em; 1964 | } 1965 | @media (max-width: 900px) { 1966 | .tsd-index-panel ul.tsd-index-list { 1967 | -webkit-column-count: 1; 1968 | -moz-column-count: 1; 1969 | -ms-column-count: 1; 1970 | -o-column-count: 1; 1971 | column-count: 1; 1972 | } 1973 | } 1974 | @media (min-width: 901px) and (max-width: 1024px) { 1975 | .tsd-index-panel ul.tsd-index-list { 1976 | -webkit-column-count: 2; 1977 | -moz-column-count: 2; 1978 | -ms-column-count: 2; 1979 | -o-column-count: 2; 1980 | column-count: 2; 1981 | } 1982 | } 1983 | .tsd-index-panel ul.tsd-index-list li { 1984 | -webkit-page-break-inside: avoid; 1985 | -moz-page-break-inside: avoid; 1986 | -ms-page-break-inside: avoid; 1987 | -o-page-break-inside: avoid; 1988 | page-break-inside: avoid; 1989 | } 1990 | .tsd-index-panel a, 1991 | .tsd-index-panel .tsd-parent-kind-module a { 1992 | color: #9600ff; 1993 | } 1994 | .tsd-index-panel .tsd-parent-kind-interface a { 1995 | color: #647F1B; 1996 | } 1997 | .tsd-index-panel .tsd-parent-kind-enum a { 1998 | color: #937210; 1999 | } 2000 | .tsd-index-panel .tsd-parent-kind-class a { 2001 | color: #0672DE; 2002 | } 2003 | .tsd-index-panel .tsd-kind-module a { 2004 | color: #9600ff; 2005 | } 2006 | .tsd-index-panel .tsd-kind-interface a { 2007 | color: #647F1B; 2008 | } 2009 | .tsd-index-panel .tsd-kind-enum a { 2010 | color: #937210; 2011 | } 2012 | .tsd-index-panel .tsd-kind-class a { 2013 | color: #0672DE; 2014 | } 2015 | .tsd-index-panel .tsd-is-private a { 2016 | color: #707070; 2017 | } 2018 | 2019 | .tsd-flag { 2020 | display: inline-block; 2021 | padding: 1px 5px; 2022 | border-radius: 4px; 2023 | color: #fff; 2024 | background-color: #707070; 2025 | text-indent: 0; 2026 | font-size: 14px; 2027 | font-weight: normal; 2028 | } 2029 | 2030 | .tsd-anchor { 2031 | position: absolute; 2032 | top: -100px; 2033 | } 2034 | 2035 | .tsd-member { 2036 | position: relative; 2037 | } 2038 | .tsd-member .tsd-anchor + h3 { 2039 | margin-top: 0; 2040 | margin-bottom: 0; 2041 | border-bottom: none; 2042 | } 2043 | .tsd-member a[data-tsd-kind] { 2044 | color: #9600ff; 2045 | } 2046 | .tsd-member a[data-tsd-kind=Interface] { 2047 | color: #647F1B; 2048 | } 2049 | .tsd-member a[data-tsd-kind=Enum] { 2050 | color: #937210; 2051 | } 2052 | .tsd-member a[data-tsd-kind=Class] { 2053 | color: #0672DE; 2054 | } 2055 | .tsd-member a[data-tsd-kind=Private] { 2056 | color: #707070; 2057 | } 2058 | 2059 | .tsd-navigation { 2060 | margin: 0 0 0 40px; 2061 | } 2062 | .tsd-navigation a { 2063 | display: block; 2064 | padding-top: 2px; 2065 | padding-bottom: 2px; 2066 | border-left: 2px solid transparent; 2067 | color: #222; 2068 | text-decoration: none; 2069 | transition: border-left-color 0.1s; 2070 | } 2071 | .tsd-navigation a:hover { 2072 | text-decoration: underline; 2073 | } 2074 | .tsd-navigation ul { 2075 | margin: 0; 2076 | padding: 0; 2077 | list-style: none; 2078 | } 2079 | .tsd-navigation li { 2080 | padding: 0; 2081 | } 2082 | 2083 | .tsd-navigation.primary { 2084 | padding-bottom: 40px; 2085 | } 2086 | .tsd-navigation.primary a { 2087 | display: block; 2088 | padding-top: 6px; 2089 | padding-bottom: 6px; 2090 | } 2091 | .tsd-navigation.primary ul li a { 2092 | padding-left: 5px; 2093 | } 2094 | .tsd-navigation.primary ul li li a { 2095 | padding-left: 25px; 2096 | } 2097 | .tsd-navigation.primary ul li li li a { 2098 | padding-left: 45px; 2099 | } 2100 | .tsd-navigation.primary ul li li li li a { 2101 | padding-left: 65px; 2102 | } 2103 | .tsd-navigation.primary ul li li li li li a { 2104 | padding-left: 85px; 2105 | } 2106 | .tsd-navigation.primary ul li li li li li li a { 2107 | padding-left: 105px; 2108 | } 2109 | .tsd-navigation.primary > ul { 2110 | border-bottom: 1px solid #eee; 2111 | } 2112 | .tsd-navigation.primary li { 2113 | border-top: 1px solid #eee; 2114 | } 2115 | .tsd-navigation.primary li.current > a { 2116 | font-weight: bold; 2117 | } 2118 | .tsd-navigation.primary li.label span { 2119 | display: block; 2120 | padding: 20px 0 6px 5px; 2121 | color: #707070; 2122 | } 2123 | .tsd-navigation.primary li.globals + li > span, .tsd-navigation.primary li.globals + li > a { 2124 | padding-top: 20px; 2125 | } 2126 | 2127 | .tsd-navigation.secondary { 2128 | max-height: calc(100vh - 1rem - 40px); 2129 | overflow: auto; 2130 | position: -webkit-sticky; 2131 | position: sticky; 2132 | top: calc(.5rem + 40px); 2133 | transition: 0.3s; 2134 | } 2135 | .tsd-navigation.secondary.tsd-navigation--toolbar-hide { 2136 | max-height: calc(100vh - 1rem); 2137 | top: 0.5rem; 2138 | } 2139 | .tsd-navigation.secondary ul { 2140 | transition: opacity 0.2s; 2141 | } 2142 | .tsd-navigation.secondary ul li a { 2143 | padding-left: 25px; 2144 | } 2145 | .tsd-navigation.secondary ul li li a { 2146 | padding-left: 45px; 2147 | } 2148 | .tsd-navigation.secondary ul li li li a { 2149 | padding-left: 65px; 2150 | } 2151 | .tsd-navigation.secondary ul li li li li a { 2152 | padding-left: 85px; 2153 | } 2154 | .tsd-navigation.secondary ul li li li li li a { 2155 | padding-left: 105px; 2156 | } 2157 | .tsd-navigation.secondary ul li li li li li li a { 2158 | padding-left: 125px; 2159 | } 2160 | .tsd-navigation.secondary ul.current a { 2161 | border-left-color: #eee; 2162 | } 2163 | .tsd-navigation.secondary li.focus > a, 2164 | .tsd-navigation.secondary ul.current li.focus > a { 2165 | border-left-color: #000; 2166 | } 2167 | .tsd-navigation.secondary li.current { 2168 | margin-top: 20px; 2169 | margin-bottom: 20px; 2170 | border-left-color: #eee; 2171 | } 2172 | .tsd-navigation.secondary li.current > a { 2173 | font-weight: bold; 2174 | } 2175 | 2176 | @media (min-width: 901px) { 2177 | .menu-sticky-wrap { 2178 | position: static; 2179 | } 2180 | } 2181 | 2182 | .tsd-panel { 2183 | margin: 20px 0; 2184 | padding: 20px; 2185 | background-color: #fff; 2186 | box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); 2187 | } 2188 | .tsd-panel:empty { 2189 | display: none; 2190 | } 2191 | .tsd-panel > h1, .tsd-panel > h2, .tsd-panel > h3 { 2192 | margin: 1.5em -20px 10px -20px; 2193 | padding: 0 20px 10px 20px; 2194 | border-bottom: 1px solid #eee; 2195 | } 2196 | .tsd-panel > h1.tsd-before-signature, .tsd-panel > h2.tsd-before-signature, .tsd-panel > h3.tsd-before-signature { 2197 | margin-bottom: 0; 2198 | border-bottom: 0; 2199 | } 2200 | .tsd-panel table { 2201 | display: block; 2202 | width: 100%; 2203 | overflow: auto; 2204 | margin-top: 10px; 2205 | word-break: normal; 2206 | word-break: keep-all; 2207 | } 2208 | .tsd-panel table th { 2209 | font-weight: bold; 2210 | } 2211 | .tsd-panel table th, .tsd-panel table td { 2212 | padding: 6px 13px; 2213 | border: 1px solid #ddd; 2214 | } 2215 | .tsd-panel table tr { 2216 | background-color: #fff; 2217 | border-top: 1px solid #ccc; 2218 | } 2219 | .tsd-panel table tr:nth-child(2n) { 2220 | background-color: #f8f8f8; 2221 | } 2222 | 2223 | .tsd-panel-group { 2224 | margin: 60px 0; 2225 | } 2226 | .tsd-panel-group > h1, .tsd-panel-group > h2, .tsd-panel-group > h3 { 2227 | padding-left: 20px; 2228 | padding-right: 20px; 2229 | } 2230 | 2231 | #tsd-search { 2232 | transition: background-color 0.2s; 2233 | } 2234 | #tsd-search .title { 2235 | position: relative; 2236 | z-index: 2; 2237 | } 2238 | #tsd-search .field { 2239 | position: absolute; 2240 | left: 0; 2241 | top: 0; 2242 | right: 40px; 2243 | height: 40px; 2244 | } 2245 | #tsd-search .field input { 2246 | box-sizing: border-box; 2247 | position: relative; 2248 | top: -50px; 2249 | z-index: 1; 2250 | width: 100%; 2251 | padding: 0 10px; 2252 | opacity: 0; 2253 | outline: 0; 2254 | border: 0; 2255 | background: transparent; 2256 | color: #222; 2257 | } 2258 | #tsd-search .field label { 2259 | position: absolute; 2260 | overflow: hidden; 2261 | right: -40px; 2262 | } 2263 | #tsd-search .field input, 2264 | #tsd-search .title { 2265 | transition: opacity 0.2s; 2266 | } 2267 | #tsd-search .results { 2268 | position: absolute; 2269 | visibility: hidden; 2270 | top: 40px; 2271 | width: 100%; 2272 | margin: 0; 2273 | padding: 0; 2274 | list-style: none; 2275 | box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); 2276 | } 2277 | #tsd-search .results li { 2278 | padding: 0 10px; 2279 | background-color: #fdfdfd; 2280 | } 2281 | #tsd-search .results li:nth-child(even) { 2282 | background-color: #fff; 2283 | } 2284 | #tsd-search .results li.state { 2285 | display: none; 2286 | } 2287 | #tsd-search .results li.current, 2288 | #tsd-search .results li:hover { 2289 | background-color: #eee; 2290 | } 2291 | #tsd-search .results a { 2292 | display: block; 2293 | } 2294 | #tsd-search .results a:before { 2295 | top: 10px; 2296 | } 2297 | #tsd-search .results span.parent { 2298 | color: #707070; 2299 | font-weight: normal; 2300 | } 2301 | #tsd-search.has-focus { 2302 | background-color: #eee; 2303 | } 2304 | #tsd-search.has-focus .field input { 2305 | top: 0; 2306 | opacity: 1; 2307 | } 2308 | #tsd-search.has-focus .title { 2309 | z-index: 0; 2310 | opacity: 0; 2311 | } 2312 | #tsd-search.has-focus .results { 2313 | visibility: visible; 2314 | } 2315 | #tsd-search.loading .results li.state.loading { 2316 | display: block; 2317 | } 2318 | #tsd-search.failure .results li.state.failure { 2319 | display: block; 2320 | } 2321 | 2322 | .tsd-signature { 2323 | margin: 0 0 1em 0; 2324 | padding: 10px; 2325 | border: 1px solid #eee; 2326 | font-family: Menlo, Monaco, Consolas, "Courier New", monospace; 2327 | font-size: 14px; 2328 | overflow-x: auto; 2329 | } 2330 | .tsd-signature.tsd-kind-icon { 2331 | padding-left: 30px; 2332 | } 2333 | .tsd-signature.tsd-kind-icon:before { 2334 | top: 10px; 2335 | left: 10px; 2336 | } 2337 | .tsd-panel > .tsd-signature { 2338 | margin-left: -20px; 2339 | margin-right: -20px; 2340 | border-width: 1px 0; 2341 | } 2342 | .tsd-panel > .tsd-signature.tsd-kind-icon { 2343 | padding-left: 40px; 2344 | } 2345 | .tsd-panel > .tsd-signature.tsd-kind-icon:before { 2346 | left: 20px; 2347 | } 2348 | 2349 | .tsd-signature-symbol { 2350 | color: #707070; 2351 | font-weight: normal; 2352 | } 2353 | 2354 | .tsd-signature-type { 2355 | font-style: italic; 2356 | font-weight: normal; 2357 | } 2358 | 2359 | .tsd-signatures { 2360 | padding: 0; 2361 | margin: 0 0 1em 0; 2362 | border: 1px solid #eee; 2363 | } 2364 | .tsd-signatures .tsd-signature { 2365 | margin: 0; 2366 | border-width: 1px 0 0 0; 2367 | transition: background-color 0.1s; 2368 | } 2369 | .tsd-signatures .tsd-signature:first-child { 2370 | border-top-width: 0; 2371 | } 2372 | .tsd-signatures .tsd-signature.current { 2373 | background-color: #eee; 2374 | } 2375 | .tsd-signatures.active > .tsd-signature { 2376 | cursor: pointer; 2377 | } 2378 | .tsd-panel > .tsd-signatures { 2379 | margin-left: -20px; 2380 | margin-right: -20px; 2381 | border-width: 1px 0; 2382 | } 2383 | .tsd-panel > .tsd-signatures .tsd-signature.tsd-kind-icon { 2384 | padding-left: 40px; 2385 | } 2386 | .tsd-panel > .tsd-signatures .tsd-signature.tsd-kind-icon:before { 2387 | left: 20px; 2388 | } 2389 | .tsd-panel > a.anchor + .tsd-signatures { 2390 | border-top-width: 0; 2391 | margin-top: -20px; 2392 | } 2393 | 2394 | ul.tsd-descriptions { 2395 | position: relative; 2396 | overflow: hidden; 2397 | padding: 0; 2398 | list-style: none; 2399 | } 2400 | ul.tsd-descriptions.active > .tsd-description { 2401 | display: none; 2402 | } 2403 | ul.tsd-descriptions.active > .tsd-description.current { 2404 | display: block; 2405 | } 2406 | ul.tsd-descriptions.active > .tsd-description.fade-in { 2407 | animation: fade-in-delayed 0.3s; 2408 | } 2409 | ul.tsd-descriptions.active > .tsd-description.fade-out { 2410 | animation: fade-out-delayed 0.3s; 2411 | position: absolute; 2412 | display: block; 2413 | top: 0; 2414 | left: 0; 2415 | right: 0; 2416 | opacity: 0; 2417 | visibility: hidden; 2418 | } 2419 | ul.tsd-descriptions h4, ul.tsd-descriptions .tsd-index-panel h3, .tsd-index-panel ul.tsd-descriptions h3 { 2420 | font-size: 16px; 2421 | margin: 1em 0 0.5em 0; 2422 | } 2423 | 2424 | ul.tsd-parameters, 2425 | ul.tsd-type-parameters { 2426 | list-style: square; 2427 | margin: 0; 2428 | padding-left: 20px; 2429 | } 2430 | ul.tsd-parameters > li.tsd-parameter-signature, 2431 | ul.tsd-type-parameters > li.tsd-parameter-signature { 2432 | list-style: none; 2433 | margin-left: -20px; 2434 | } 2435 | ul.tsd-parameters h5, 2436 | ul.tsd-type-parameters h5 { 2437 | font-size: 16px; 2438 | margin: 1em 0 0.5em 0; 2439 | } 2440 | ul.tsd-parameters .tsd-comment, 2441 | ul.tsd-type-parameters .tsd-comment { 2442 | margin-top: -0.5em; 2443 | } 2444 | 2445 | .tsd-sources { 2446 | font-size: 14px; 2447 | color: #707070; 2448 | margin: 0 0 1em 0; 2449 | } 2450 | .tsd-sources a { 2451 | color: #707070; 2452 | text-decoration: underline; 2453 | } 2454 | .tsd-sources ul, .tsd-sources p { 2455 | margin: 0 !important; 2456 | } 2457 | .tsd-sources ul { 2458 | list-style: none; 2459 | padding: 0; 2460 | } 2461 | 2462 | .tsd-page-toolbar { 2463 | position: fixed; 2464 | z-index: 1; 2465 | top: 0; 2466 | left: 0; 2467 | width: 100%; 2468 | height: 40px; 2469 | color: #333; 2470 | background: #fff; 2471 | border-bottom: 1px solid #eee; 2472 | transition: transform 0.3s linear; 2473 | } 2474 | .tsd-page-toolbar a { 2475 | color: #333; 2476 | text-decoration: none; 2477 | } 2478 | .tsd-page-toolbar a.title { 2479 | font-weight: bold; 2480 | } 2481 | .tsd-page-toolbar a.title:hover { 2482 | text-decoration: underline; 2483 | } 2484 | .tsd-page-toolbar .table-wrap { 2485 | display: table; 2486 | width: 100%; 2487 | height: 40px; 2488 | } 2489 | .tsd-page-toolbar .table-cell { 2490 | display: table-cell; 2491 | position: relative; 2492 | white-space: nowrap; 2493 | line-height: 40px; 2494 | } 2495 | .tsd-page-toolbar .table-cell:first-child { 2496 | width: 100%; 2497 | } 2498 | 2499 | .tsd-page-toolbar--hide { 2500 | transform: translateY(-100%); 2501 | } 2502 | 2503 | .tsd-select .tsd-select-list li:before, .tsd-select .tsd-select-label:before, .tsd-widget:before { 2504 | content: ""; 2505 | display: inline-block; 2506 | width: 40px; 2507 | height: 40px; 2508 | margin: 0 -8px 0 0; 2509 | background-image: url(../images/widgets.png); 2510 | background-repeat: no-repeat; 2511 | text-indent: -1024px; 2512 | vertical-align: bottom; 2513 | } 2514 | @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) { 2515 | .tsd-select .tsd-select-list li:before, .tsd-select .tsd-select-label:before, .tsd-widget:before { 2516 | background-image: url(../images/widgets@2x.png); 2517 | background-size: 320px 40px; 2518 | } 2519 | } 2520 | 2521 | .tsd-widget { 2522 | display: inline-block; 2523 | overflow: hidden; 2524 | opacity: 0.6; 2525 | height: 40px; 2526 | transition: opacity 0.1s, background-color 0.2s; 2527 | vertical-align: bottom; 2528 | cursor: pointer; 2529 | } 2530 | .tsd-widget:hover { 2531 | opacity: 0.8; 2532 | } 2533 | .tsd-widget.active { 2534 | opacity: 1; 2535 | background-color: #eee; 2536 | } 2537 | .tsd-widget.no-caption { 2538 | width: 40px; 2539 | } 2540 | .tsd-widget.no-caption:before { 2541 | margin: 0; 2542 | } 2543 | .tsd-widget.search:before { 2544 | background-position: 0 0; 2545 | } 2546 | .tsd-widget.menu:before { 2547 | background-position: -40px 0; 2548 | } 2549 | .tsd-widget.options:before { 2550 | background-position: -80px 0; 2551 | } 2552 | .tsd-widget.options, .tsd-widget.menu { 2553 | display: none; 2554 | } 2555 | @media (max-width: 900px) { 2556 | .tsd-widget.options, .tsd-widget.menu { 2557 | display: inline-block; 2558 | } 2559 | } 2560 | input[type=checkbox] + .tsd-widget:before { 2561 | background-position: -120px 0; 2562 | } 2563 | input[type=checkbox]:checked + .tsd-widget:before { 2564 | background-position: -160px 0; 2565 | } 2566 | 2567 | .tsd-select { 2568 | position: relative; 2569 | display: inline-block; 2570 | height: 40px; 2571 | transition: opacity 0.1s, background-color 0.2s; 2572 | vertical-align: bottom; 2573 | cursor: pointer; 2574 | } 2575 | .tsd-select .tsd-select-label { 2576 | opacity: 0.6; 2577 | transition: opacity 0.2s; 2578 | } 2579 | .tsd-select .tsd-select-label:before { 2580 | background-position: -240px 0; 2581 | } 2582 | .tsd-select.active .tsd-select-label { 2583 | opacity: 0.8; 2584 | } 2585 | .tsd-select.active .tsd-select-list { 2586 | visibility: visible; 2587 | opacity: 1; 2588 | transition-delay: 0s; 2589 | } 2590 | .tsd-select .tsd-select-list { 2591 | position: absolute; 2592 | visibility: hidden; 2593 | top: 40px; 2594 | left: 0; 2595 | margin: 0; 2596 | padding: 0; 2597 | opacity: 0; 2598 | list-style: none; 2599 | box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); 2600 | transition: visibility 0s 0.2s, opacity 0.2s; 2601 | } 2602 | .tsd-select .tsd-select-list li { 2603 | padding: 0 20px 0 0; 2604 | background-color: #fdfdfd; 2605 | } 2606 | .tsd-select .tsd-select-list li:before { 2607 | background-position: 40px 0; 2608 | } 2609 | .tsd-select .tsd-select-list li:nth-child(even) { 2610 | background-color: #fff; 2611 | } 2612 | .tsd-select .tsd-select-list li:hover { 2613 | background-color: #eee; 2614 | } 2615 | .tsd-select .tsd-select-list li.selected:before { 2616 | background-position: -200px 0; 2617 | } 2618 | @media (max-width: 900px) { 2619 | .tsd-select .tsd-select-list { 2620 | top: 0; 2621 | left: auto; 2622 | right: 100%; 2623 | margin-right: -5px; 2624 | } 2625 | .tsd-select .tsd-select-label:before { 2626 | background-position: -280px 0; 2627 | } 2628 | } 2629 | 2630 | img { 2631 | max-width: 100%; 2632 | } 2633 | -------------------------------------------------------------------------------- /docs/assets/images/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphile/jest-time-helpers/acac9f539c2539629e1af0c649fec5d388353390/docs/assets/images/icons.png -------------------------------------------------------------------------------- /docs/assets/images/icons@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphile/jest-time-helpers/acac9f539c2539629e1af0c649fec5d388353390/docs/assets/images/icons@2x.png -------------------------------------------------------------------------------- /docs/assets/images/widgets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphile/jest-time-helpers/acac9f539c2539629e1af0c649fec5d388353390/docs/assets/images/widgets.png -------------------------------------------------------------------------------- /docs/assets/images/widgets@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphile/jest-time-helpers/acac9f539c2539629e1af0c649fec5d388353390/docs/assets/images/widgets@2x.png -------------------------------------------------------------------------------- /docs/assets/js/search.js: -------------------------------------------------------------------------------- 1 | window.searchData = {"kinds":{"32":"Variable","64":"Function"},"rows":[{"id":0,"kind":64,"name":"sleepUntil","url":"modules.html#sleepuntil","classes":"tsd-kind-function"},{"id":1,"kind":64,"name":"setupFakeTimers","url":"modules.html#setupfaketimers","classes":"tsd-kind-function"},{"id":2,"kind":64,"name":"sleep","url":"modules.html#sleep","classes":"tsd-kind-function"},{"id":3,"kind":32,"name":"SECOND","url":"modules.html#second","classes":"tsd-kind-variable"},{"id":4,"kind":32,"name":"MINUTE","url":"modules.html#minute","classes":"tsd-kind-variable"},{"id":5,"kind":32,"name":"HOUR","url":"modules.html#hour","classes":"tsd-kind-variable"},{"id":6,"kind":32,"name":"DAY","url":"modules.html#day","classes":"tsd-kind-variable"},{"id":7,"kind":32,"name":"WEEK","url":"modules.html#week","classes":"tsd-kind-variable"}],"index":{"version":"2.3.9","fields":["name","parent"],"fieldVectors":[["name/0",[0,17.918]],["parent/0",[]],["name/1",[1,17.918]],["parent/1",[]],["name/2",[2,17.918]],["parent/2",[]],["name/3",[3,17.918]],["parent/3",[]],["name/4",[4,17.918]],["parent/4",[]],["name/5",[5,17.918]],["parent/5",[]],["name/6",[6,17.918]],["parent/6",[]],["name/7",[7,17.918]],["parent/7",[]]],"invertedIndex":[["day",{"_index":6,"name":{"6":{}},"parent":{}}],["hour",{"_index":5,"name":{"5":{}},"parent":{}}],["minute",{"_index":4,"name":{"4":{}},"parent":{}}],["second",{"_index":3,"name":{"3":{}},"parent":{}}],["setupfaketimers",{"_index":1,"name":{"1":{}},"parent":{}}],["sleep",{"_index":2,"name":{"2":{}},"parent":{}}],["sleepuntil",{"_index":0,"name":{"0":{}},"parent":{}}],["week",{"_index":7,"name":{"7":{}},"parent":{}}]],"pipeline":[]}} -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 |Helpers you can use in tests that relate to the passage of time (i.e. code that
65 | involves setTimeout
, setInterval
, new Date()
, Date.now()
, etc.). Allows
66 | you to "set the clock" to a particular point in time, advancing any setTimeout
67 | or setInterval
calls that need advancing at the same time. Makes it possible
68 | (even pleasant!) to test code that would normally be dependent on the passage of
69 | time, such as scheduled events.
This helper library was born out of 72 | adding cron functionality to 73 | Graphile Worker and needing a reliable way 74 | to test it.
75 |If you find this useful, please give it a star ⭐
76 | 77 |For full documentation, please 80 | click the headers. The following acts as a quick-reference.
81 | 82 |setupFakeTimers()
Import and call the setupFakeTimers
helper at the top of your test file:
import { setupFakeTimers } from "jest-time-helpers";
86 | const { setTime } = setupFakeTimers();
87 |
88 | Then inside your tests you can call setTime(timestamp)
to pretend that the
89 | system time is the timestamp you gave. When you set the timestamp to a value
90 | after the previous timestamp, all timers (setTimeout
, setInterval
, etc) will
91 | be advanced by that amount, as well as the "clock". When you set the timestamp
92 | to a value before the previous timestamp, only the clock will be updated and no
93 | timeouts/intervals will be effected.
Example:
95 |const REFERENCE_TIMESTAMP = 950536800000; /* 14th February 2000, 2pm UTC */
96 |
97 | test("new Date().toISOString() returns the expected timestamp", () => {
98 | setTime(REFERENCE_TIMESTAMP);
99 | // Note, time may have advanced a millisecond or two, so we can't be too precise
100 | expect(new Date().toISOString()).toMatch(/^2000-02-14T14:00:0.*Z$/);
101 | });
102 |
103 |
104 | sleep(ms: number)
A trivial method that returns a promise that resolves after the given number of 107 | real-time milliseconds. The important part about this method (as opposed to one 108 | that you might write yourself) is that it is not inhibited or influenced by fake 109 | timers.
110 | 111 |sleepUntil(condition: () => void, maxDuration = 2000, pollInterval = 2)
Polls the condition
callback every pollInterval
milliseconds, and resolves
114 | success when condition()
returns a truthy value. If maxDuration
elapses
115 | before condition()
returns true, returns a rejected promise.
Useful for waiting on external actions without putting arbitrary sleeps in your 117 | code (e.g. waiting for a database record to be created).
118 |Like sleep()
, it is not inhibited or influenced by fake timers.
SECOND
- number of milliseconds in a secondMINUTE
- number of milliseconds in a minuteHOUR
- number of milliseconds in a hourDAY
- number of milliseconds in a dayWEEK
- number of milliseconds in a weekTo help us develop software sustainably under the MIT license, we ask all 133 | individuals and businesses that use our software to help support its ongoing 134 | maintenance and development via sponsorship.
135 | 136 |Checkout the repository, then run the following commands:
142 |yarn
143 | yarn test
144 |
145 | Generated using TypeDoc
195 |One hour in milliseconds
114 |One minute in milliseconds
129 |One second in milliseconds
144 |One week in milliseconds
159 |Sets up fake timers and Date implementation within your Jest test file. You 181 | should call this at the top of the file (not within a test or an 182 | after/before); tests that need fake timers should go into their own test 183 | file.
184 |Returns an object containing a setTime
function which you can use to set
186 | the current (fake) date within your test to a particular JavaScript
187 | timestamp (number of milliseconds since 1970-01-01T00:00:00Z).
Enables the jest.useFakeTimers()
integration, and overwrites global.Date
189 | with a custom function that automatically applies your test file's given
190 | offset.
Returns the real-world current timestamp (unaffected by fake timers).
206 |Sets the offset
such that a call to Date.now()
(or new Date()
) would
226 | return this timestamp if called immediately (but time continues to
227 | progress as expected after this). Also advances the timers by the
228 | difference from the previous offset
, if positive. Setting time backwards
229 | is allowed (like setting back the system clock on a computer), but will
230 | not advance (or undo the advancement of) any timers.
Since advancing the time a few hours might not run all the intermediary 233 | code quite right, we actually step it up by a configurable increment 234 | (defaults to one minute) at a time. Setting time backwards (no matter how 235 | far back) is done all at once.
236 |the target timestamp
243 |the maximum we should advance time by at once in order to step towards timestamp
Wait a number of milliseconds of real time (not mocked time); useful for 278 | allowing the runloop or external systems to advance.
279 |Polls until the condition passes.
307 |Polls the condition
callback every pollInterval
ms of real time. If/when
309 | it returns a truthy value, resolves successfully. If maxDuration
is
310 | exceeded before condition()
returns true, rejects with an error.
a callback function that should return true when no more sleep is required
318 |an optional maximum duration to sleep
336 |an optional period of how long we should wait between checks; lower values increase load on the server but may make tests pass faster, larger values are more efficient but increase test latency.
342 |Generated using TypeDoc
399 |",
36 | "license": "MIT",
37 | "bugs": {
38 | "url": "https://github.com/graphile/jest-time-helpers/issues"
39 | },
40 | "homepage": "https://github.com/graphile/jest-time-helpers#readme",
41 | "peerDependencies": {
42 | "jest": ">=22 <27"
43 | },
44 | "devDependencies": {
45 | "@types/node": "^14.14.21",
46 | "@typescript-eslint/eslint-plugin": "^4.13.0",
47 | "@typescript-eslint/parser": "^4.13.0",
48 | "depcheck": "^1.3.1",
49 | "eslint": "^7.17.0",
50 | "eslint-config-prettier": "^7.1.0",
51 | "eslint-plugin-import": "^2.22.1",
52 | "eslint-plugin-jest": "^24.1.3",
53 | "eslint-plugin-simple-import-sort": "^7.0.0",
54 | "jest": "^26.6.3",
55 | "prettier": "^2.2.1",
56 | "ts-jest": "^26.4.4",
57 | "typedoc": "^0.20.14",
58 | "typescript": "^4.1.3"
59 | },
60 | "files": [
61 | "dist"
62 | ]
63 | }
64 |
--------------------------------------------------------------------------------
/src/index.ts:
--------------------------------------------------------------------------------
1 | import * as assert from "assert";
2 | import * as util from "util";
3 |
4 | // Grab the setTimeout from global before jest overwrites it with useFakeTimers
5 | const setTimeoutBypassingFakes = global.setTimeout;
6 |
7 | /**
8 | * Wait a number of milliseconds of _real time_ (not mocked time); useful for
9 | * allowing the runloop or external systems to advance.
10 | *
11 | * @param ts - how long to sleep for.
12 | */
13 | export const sleep = (
14 | ms: number,
15 | unref = false,
16 | ): Promise & { timeout: NodeJS.Timeout } => {
17 | let timeout!: NodeJS.Timeout;
18 | const promise = new Promise((resolve) => {
19 | timeout = setTimeoutBypassingFakes(resolve, ms);
20 | });
21 | if (unref) {
22 | timeout.unref();
23 | }
24 | return Object.assign(promise, { timeout });
25 | };
26 |
27 | /**
28 | * Polls until the condition passes.
29 | *
30 | * Polls the `condition` callback every `pollInterval` ms of real time. If/when
31 | * it returns a truthy value, resolves successfully. If `maxDuration` is
32 | * exceeded before `condition()` returns true, rejects with an error.
33 | *
34 | * @param condition - a callback function that should return true when no more sleep is required
35 | * @param maxDuration - an optional maximum duration to sleep
36 | * @param pollInterval - an optional period of how long we should wait between checks; lower values increase load on the server but may make tests pass faster, larger values are more efficient but increase test latency.
37 | */
38 | export async function sleepUntil(
39 | condition: () => boolean,
40 | maxDuration = 2000,
41 | pollInterval = 2,
42 | ): Promise {
43 | assert.ok(pollInterval >= 1, "pollInterval must be >= 1 millisecond");
44 | if (condition()) {
45 | // Already fine, no need to sleep
46 | return;
47 | }
48 |
49 | // Wait for condition to pass
50 | const start = Date.now();
51 | while (Date.now() - start < maxDuration) {
52 | await sleep(pollInterval);
53 | if (condition()) {
54 | // Success
55 | return;
56 | }
57 | }
58 |
59 | // maxDuration exceeded
60 | throw new Error(
61 | `Slept for ${Date.now() - start}ms but condition never passed`,
62 | );
63 | }
64 |
65 | /**
66 | * This is for letting the Node.js event loop advance, e.g. when `setTimeout`
67 | * has `await` in the chain.
68 | *
69 | * @internal
70 | */
71 | async function aFewRunLoops(count = 5) {
72 | for (let i = 0; i < count; i++) {
73 | await sleep(0);
74 | }
75 | }
76 |
77 | /**
78 | * Sets up fake timers and Date implementation within your Jest test file. You
79 | * should call this at the top of the file (**not** within a test or an
80 | * after/before); tests that need fake timers should go into their own test
81 | * file.
82 | *
83 | * Returns an object containing a `setTime` function which you can use to set
84 | * the current (fake) date within your test to a particular JavaScript
85 | * timestamp (number of milliseconds since 1970-01-01T00:00:00Z).
86 | *
87 | * Enables the `jest.useFakeTimers()` integration, and overwrites `global.Date`
88 | * with a custom function that automatically applies your test file's given
89 | * offset.
90 | */
91 | export function setupFakeTimers() {
92 | jest.useFakeTimers();
93 |
94 | const OriginalDate = global.Date;
95 |
96 | /** The offset, in milliseconds, to apply to results from `Date.now()` */
97 | let offset = 0;
98 |
99 | function fakeNow() {
100 | return OriginalDate.now() + offset;
101 | }
102 |
103 | /**
104 | * A copy of `Date`, but overrides `new Date()` and `Date.now()` to return a
105 | * date/timestamp factoring in `setTime()` calls.
106 | */
107 | const FakeDate: typeof Date = function (...args: any[]) {
108 | if (args.length === 0) {
109 | // `new Date()` becomes `new Date(fakeNow())`
110 | return new OriginalDate(fakeNow());
111 | } else if (args.length === 1) {
112 | // As before
113 | return new OriginalDate(args[0]);
114 | } else {
115 | // As before
116 | return new OriginalDate(
117 | args[0],
118 | args[1],
119 | args[2],
120 | args[3],
121 | args[4],
122 | args[5],
123 | args[6],
124 | );
125 | }
126 | } as any;
127 |
128 | // Copy static methods of Date, overriding Date.now()
129 | FakeDate.now = () => fakeNow();
130 | FakeDate.parse = Date.parse;
131 | FakeDate.UTC = Date.UTC;
132 |
133 | /**
134 | * Sets the `offset` such that a call to `Date.now()` (or `new Date()`) would
135 | * return this timestamp if called immediately (but time continues to
136 | * progress as expected after this). Also advances the timers by the
137 | * difference from the previous `offset`, if positive. Setting time backwards
138 | * is allowed (like setting back the system clock on a computer), but will
139 | * not advance (or undo the advancement of) any timers.
140 | *
141 | * Since advancing the time a few hours might not run all the intermediary
142 | * code quite right, we actually step it up by a configurable increment
143 | * (defaults to one minute) at a time. Setting time backwards (no matter how
144 | * far back) is done all at once.
145 | *
146 | * @param timestamp - the target timestamp
147 | * @param increment - the maximum we should advance time by at once in order to step towards `timestamp`
148 | */
149 | async function setTime(timestamp: number, increment = MINUTE) {
150 | assert.strictEqual(
151 | typeof timestamp,
152 | "number",
153 | `Expected \`setTime\` to be passed a number of milliseconds, instead received '${util.inspect(
154 | timestamp,
155 | )}'`,
156 | );
157 | const finalOffset = timestamp - OriginalDate.now();
158 | const advancement = finalOffset - offset;
159 | if (advancement < 0) {
160 | offset = finalOffset;
161 | } else {
162 | let previousOffset = offset;
163 | while (previousOffset + increment < finalOffset) {
164 | offset = previousOffset + increment;
165 | previousOffset = offset;
166 | jest.advanceTimersByTime(increment);
167 | await aFewRunLoops();
168 | }
169 | if (previousOffset < finalOffset) {
170 | offset = finalOffset;
171 | jest.advanceTimersByTime(finalOffset - previousOffset);
172 | await aFewRunLoops();
173 | }
174 | }
175 | }
176 |
177 | beforeEach(() => {
178 | offset = 0;
179 | global.Date = FakeDate;
180 | });
181 | afterEach(() => {
182 | global.Date = OriginalDate;
183 | });
184 |
185 | /**
186 | * Returns the real-world current timestamp (unaffected by fake timers).
187 | */
188 | function realNow() {
189 | return OriginalDate.now();
190 | }
191 |
192 | // In future we may add other methods such as `setTimeWithoutAdvancingTimers`
193 | // to emulate the system clock changing without real time elapsing.
194 | return { setTime, realNow };
195 | }
196 |
197 | /** One second in milliseconds */
198 | export const SECOND = 1000;
199 | /** One minute in milliseconds */
200 | export const MINUTE = 60 * SECOND;
201 | /** One hour in milliseconds */
202 | export const HOUR = 60 * MINUTE;
203 | /** One day in milliseconds */
204 | export const DAY = 24 * HOUR;
205 | /** One week in milliseconds */
206 | export const WEEK = 7 * DAY;
207 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "rootDir": "src",
4 | "declarationDir": "./dist",
5 | "outDir": "./dist",
6 | "declaration": true,
7 | "allowJs": false,
8 | "target": "es2018",
9 | "module": "commonjs",
10 | "moduleResolution": "node",
11 | "sourceMap": true,
12 | "pretty": true,
13 | "experimentalDecorators": true,
14 | "noImplicitAny": true,
15 | "suppressImplicitAnyIndexErrors": true,
16 | "strictNullChecks": true,
17 | "noFallthroughCasesInSwitch": true,
18 | "noUnusedParameters": true,
19 | "noUnusedLocals": true,
20 | "preserveWatchOutput": true,
21 | "lib": ["es2018", "esnext.asynciterable"]
22 | },
23 | "include": ["src/**/*"],
24 | "exclude": ["node_modules", "dist"]
25 | }
26 |
--------------------------------------------------------------------------------
One day in milliseconds
99 |