main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
522 bytes
|
Line | |
---|
1 | import { Target } from '../types'
|
---|
2 | import { SUPPORT } from './support'
|
---|
3 |
|
---|
4 | export const sharedConfigResolver = {
|
---|
5 | target(value: Target) {
|
---|
6 | if (value) {
|
---|
7 | return () => ('current' in value ? value.current : value)
|
---|
8 | }
|
---|
9 | return undefined
|
---|
10 | },
|
---|
11 | enabled(value = true) {
|
---|
12 | return value
|
---|
13 | },
|
---|
14 | window(value = SUPPORT.isBrowser ? window : undefined) {
|
---|
15 | return value
|
---|
16 | },
|
---|
17 | eventOptions({ passive = true, capture = false } = {}) {
|
---|
18 | return { passive, capture }
|
---|
19 | },
|
---|
20 | transform(value: any) {
|
---|
21 | return value
|
---|
22 | }
|
---|
23 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.