jails-js 5.0.0-beta.11 → 5.0.0-beta.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/component.ts CHANGED
@@ -2,19 +2,15 @@ import morphdom from 'morphdom'
2
2
 
3
3
  import { rAF, dup, buildtemplates } from './utils'
4
4
  import { on, off, trigger } from './utils/events'
5
- import { publish, subscribe, unsubscribe } from './utils/pubsub'
5
+ import { publish, subscribe } from './utils/pubsub'
6
6
 
7
- type MainArgs = () => Array<Function>
7
+ export default function Component( elm, { module, dependencies, templates, components }) {
8
8
 
9
- export default function Component(elm, { module, dependencies, templates, components }) {
10
-
11
- const options = getOptions(module)
12
-
13
- buildtemplates(elm, components, templates)
9
+ const options = getOptions( module )
10
+ buildtemplates( elm, components, templates )
14
11
 
15
12
  const tplid = elm.getAttribute('tplid')
16
-
17
- const template = templates[tplid]
13
+ const template = tplid ? templates[tplid] : null
18
14
  const state = { data: module.model ? dup(module.model) : {} }
19
15
 
20
16
  const base = {
@@ -23,9 +19,8 @@ export default function Component(elm, { module, dependencies, templates, compon
23
19
  dependencies,
24
20
  publish,
25
21
  subscribe,
26
- unsubscribe,
27
22
 
28
- main(fn: MainArgs) {
23
+ main(fn) {
29
24
  options.main = fn
30
25
  },
31
26
 
@@ -37,26 +32,29 @@ export default function Component(elm, { module, dependencies, templates, compon
37
32
  options.onupdate = fn
38
33
  },
39
34
 
40
- on(eventName: string, selectorOrCallback: object | Function, callback: Function) {
35
+ on(eventName, selectorOrCallback, callback) {
41
36
  on(elm, eventName, selectorOrCallback, callback)
42
37
  },
43
38
 
44
- off(eventName: string, callback: Function) {
39
+ off(eventName, callback) {
45
40
  off(elm, eventName, callback)
46
41
  },
47
42
 
48
- trigger(eventName: string, target: string, args: any) {
49
- if (target.constructor === String)
50
- trigger(elm.querySelector(target), eventName, { args: args })
43
+ trigger(eventName, target, args) {
44
+ if (target.constructor === String) {
45
+ Array
46
+ .from(elm.querySelectorAll(target))
47
+ .forEach( children => trigger(children, eventName, { args: args }) )
48
+ }
51
49
  else trigger(elm, eventName, { args: target })
52
50
  },
53
51
 
54
- emit: (...args) => {
52
+ emit: ( ...args ) => {
55
53
  trigger(elm, args.shift(), { args: args })
56
54
  },
57
55
 
58
56
  state: {
59
- set(data: any) {
57
+ set( data ) {
60
58
  if (data.constructor === Function) {
61
59
  const newstate = dup(state.data)
62
60
  data(newstate)
@@ -71,7 +69,7 @@ export default function Component(elm, { module, dependencies, templates, compon
71
69
  }
72
70
  },
73
71
 
74
- render(data: object = state.data) {
72
+ render(data = state.data) {
75
73
 
76
74
  if (!document.body.contains(elm))
77
75
  return
@@ -84,17 +82,13 @@ export default function Component(elm, { module, dependencies, templates, compon
84
82
  morphdom(elm, newhtml, morphdomOptions(elm, options))
85
83
 
86
84
  rAF(_ => {
87
- rAF(_ => {
88
- Array
89
- .from(elm.querySelectorAll('[tplid]'))
90
- .forEach(child => {
91
- child.options.onupdate(newdata)
92
- child.base.render(newdata)
93
- })
94
- })
95
-
85
+ Array
86
+ .from(elm.querySelectorAll('[tplid]'))
87
+ .forEach((child: any) => {
88
+ child.options.onupdate(newdata)
89
+ child.base.render(newdata)
90
+ })
96
91
  })
97
-
98
92
  }
99
93
  }
100
94
 
@@ -102,13 +96,13 @@ export default function Component(elm, { module, dependencies, templates, compon
102
96
  }
103
97
 
104
98
  const getOptions = (module) => ({
105
- main: _ => _,
106
- unmount: _ => _,
107
- onupdate: _ => _,
108
- view: module.view ? module.view : _ => _
99
+ main: (a) => a,
100
+ unmount: (a) => a,
101
+ onupdate: (a) => a,
102
+ view: module.view ? module.view : (a) => a
109
103
  })
110
104
 
111
- const morphdomOptions = (_parent, options) => ({
105
+ const morphdomOptions = (_parent, options ) => ({
112
106
 
113
107
  onNodeAdded: onUpdates(_parent, options),
114
108
  onElUpdated: onUpdates(_parent, options),
@@ -123,7 +117,7 @@ const morphdomOptions = (_parent, options) => ({
123
117
  })
124
118
 
125
119
  const checkStatic = (node) => {
126
- if ('static' in node.dataset) {
120
+ if ('static' in node.dataset || 'html-static' in node.attributes) {
127
121
  return false
128
122
  }
129
123
  }
@@ -134,10 +128,10 @@ const onUpdates = (_parent, options) => (node) => {
134
128
 
135
129
  if (node.getAttribute && node.getAttribute('scope')) {
136
130
 
137
- const scope = JSON.parse(node.getAttribute('scope').replace(/\'/g, '\"'))
131
+ const scope = JSON.parse((node.getAttribute('scope') ||'').replace(/\'/g, '\"'))
138
132
 
139
133
  Array.from(node.querySelectorAll('[tplid]'))
140
- .map(el => {
134
+ .map((el) => {
141
135
  const data = Object.assign({}, _parent.base.state.get(), scope)
142
136
  options.onupdate(data)
143
137
  el.base.render(data)
@@ -146,4 +140,6 @@ const onUpdates = (_parent, options) => (node) => {
146
140
  node.removeAttribute('scope')
147
141
  }
148
142
  }
143
+
144
+ return node
149
145
  }
package/src/element.ts CHANGED
@@ -4,6 +4,10 @@ export default function Element(module, dependencies, templates, components) {
4
4
 
5
5
  return class extends HTMLElement {
6
6
 
7
+ base: any
8
+ options: any
9
+ __events: any
10
+
7
11
  constructor() {
8
12
 
9
13
  super()
package/src/index.ts CHANGED
@@ -1,26 +1,28 @@
1
+
1
2
  import { buildtemplates } from './utils'
2
3
  import Element from './element'
3
4
 
4
- export const templates = {}
5
- export const components = {}
5
+ const templates = {}
6
+ const components = {}
6
7
 
7
8
  export default {
8
9
 
9
- register(name: string, module: any, dependencies: object = {}) {
10
+ register( name:string, module:any, dependencies: object ) {
10
11
  components[name] = { name, module, dependencies }
11
12
  },
12
13
 
13
14
  start() {
14
15
  const body = document.body
15
- buildtemplates(body, components, templates)
16
+ buildtemplates( body, components, templates )
16
17
  registerComponents()
17
18
  }
18
19
  }
19
20
 
20
21
  const registerComponents = () => {
21
22
  Object
22
- .values(components)
23
- .forEach(({ name, module, dependencies }) => {
23
+ .values( components )
24
+ .forEach( (component) => {
25
+ const { name, module, dependencies } = component
24
26
  const Base = Element(module, dependencies, templates, components)
25
27
  customElements.define(name, Base)
26
28
  })
@@ -1,13 +1,10 @@
1
1
  import { compile, defaultConfig, filters } from 'squirrelly'
2
2
  import { decodeHtmlEntities } from './utils'
3
3
 
4
- const defaultOptions = {
5
- ...defaultConfig,
6
- tags: ['{', '}'],
7
- useWith: true
8
- }
4
+ defaultConfig.tags = ['{', '}']
5
+ defaultConfig.useWith = true
9
6
 
10
- export default function templateSystem(element) {
7
+ export default function templateSystem( element ) {
11
8
 
12
9
  const tree = document.createElement('template')
13
10
 
@@ -21,10 +18,10 @@ export default function templateSystem(element) {
21
18
  .replace(/html-/g, '')
22
19
  )
23
20
 
24
- const template = compile(html, defaultOptions)
21
+ const template = compile(html, defaultConfig)
25
22
 
26
- return (data) => {
27
- return template(data, defaultOptions)
23
+ return ( data ) => {
24
+ return template(data, defaultConfig)
28
25
  }
29
26
  }
30
27
 
@@ -38,10 +35,10 @@ const directives = (vdom) => {
38
35
 
39
36
  if (nodes.length) {
40
37
 
41
- nodes.forEach(node => {
38
+ nodes.forEach(( node ) => {
42
39
  if (node.getAttribute('html-foreach')) {
43
- const instruction = node.getAttribute('html-foreach')
44
- const split = instruction.match(/(.*)\sin\s(.*)/)
40
+ const instruction = node.getAttribute('html-foreach') || ''
41
+ const split = instruction.match(/(.*)\sin\s(.*)/) || ''
45
42
  const varname = split[1]
46
43
  const object = split[2]
47
44
  node.removeAttribute('html-foreach')
@@ -50,8 +47,8 @@ const directives = (vdom) => {
50
47
  const close = document.createTextNode('{/foreach}')
51
48
  wrap(open, node, close)
52
49
  } else if (node.getAttribute('html-for')) {
53
- const instruction = node.getAttribute('html-for')
54
- const split = instruction.match(/(.*)\sin\s(.*)/)
50
+ const instruction = node.getAttribute('html-for') || ''
51
+ const split = instruction.match(/(.*)\sin\s(.*)/) || ''
55
52
  const varname = split[1]
56
53
  const object = split[2]
57
54
  node.removeAttribute('html-for')
@@ -75,7 +72,7 @@ const directives = (vdom) => {
75
72
  filters.define('JSON', (scope, index, varname) => {
76
73
 
77
74
  const key = index.constructor == String ? '$key' : '$index'
78
- const newobject = { $index: index }
75
+ const newobject = { $index: index } as any
79
76
 
80
77
  newobject[varname] = scope
81
78
  newobject[key] = index
@@ -84,6 +81,6 @@ filters.define('JSON', (scope, index, varname) => {
84
81
  })
85
82
 
86
83
  const wrap = (open, node, close) => {
87
- node.parentNode.insertBefore(open, node)
88
- node.parentNode.insertBefore(close, node.nextSibling)
84
+ node.parentNode?.insertBefore(open, node)
85
+ node.parentNode?.insertBefore(close, node.nextSibling)
89
86
  }
@@ -41,7 +41,7 @@ const delegate = (node, selector, callback) => {
41
41
  e.delegateTarget = parent
42
42
  callback.apply(element, [e].concat(detail.args))
43
43
  }
44
- if( parent === node ) break
44
+ if (parent === node) break
45
45
  parent = parent.parentNode
46
46
  }
47
47
  }
@@ -3,7 +3,10 @@ import templateSystem from '../template-system'
3
3
  const textarea = document.createElement('textarea')
4
4
 
5
5
  export const rAF = (fn) => {
6
- (requestAnimationFrame || setTimeout)(fn, 1000 / 60)
6
+ if (requestAnimationFrame)
7
+ return requestAnimationFrame(fn)
8
+ else
9
+ return setTimeout(fn, 1000 / 60)
7
10
  }
8
11
 
9
12
  export const uuid = () => {
@@ -13,11 +16,11 @@ export const uuid = () => {
13
16
  })
14
17
  }
15
18
 
16
- export const stripTemplateTag = (element) => {
19
+ export const stripTemplateTag = ( element ) => {
17
20
  const templates = Array.from(element.querySelectorAll('template'))
18
21
  // https://gist.github.com/harmenjanssen/07e425248779c65bc5d11b02fb913274
19
- templates.forEach(template => {
20
- template.parentNode.replaceChild(template.content, template)
22
+ templates.forEach((template) => {
23
+ template.parentNode?.replaceChild(template.content, template)
21
24
  stripTemplateTag(template.content)
22
25
  })
23
26
  }
@@ -26,7 +29,7 @@ export const dup = (o) => {
26
29
  return JSON.parse(JSON.stringify(o))
27
30
  }
28
31
 
29
- export const createTemplateId = (element, templates) => {
32
+ export const createTemplateId = (element, templates ) => {
30
33
 
31
34
  const tplid = element.getAttribute('tplid')
32
35
 
@@ -37,21 +40,21 @@ export const createTemplateId = (element, templates) => {
37
40
  }
38
41
  }
39
42
 
40
- export const buildtemplates = (target, components, templates) => {
43
+ export const buildtemplates = ( target, components, templates ) => {
41
44
 
42
45
  return Array
43
46
  .from(target.querySelectorAll('*'))
44
- .filter(node => node.tagName.toLowerCase() in components)
47
+ .filter((node) => node.tagName.toLowerCase() in components)
45
48
  .reverse()
46
- .map(node => {
49
+ .map((node) => {
47
50
  Array.from(node.querySelectorAll('template'))
48
- .map(template => buildtemplates(template.content, components, templates))
51
+ .map((template) => buildtemplates(template.content, components, templates))
49
52
  createTemplateId(node, templates)
50
53
  return node
51
54
  })
52
55
  }
53
56
 
54
- export const decodeHtmlEntities = (str) => {
57
+ export const decodeHtmlEntities = ( str ) => {
55
58
  textarea.innerHTML = str
56
59
  return textarea.value
57
60
  }
@@ -1,5 +1,5 @@
1
- const topics = {}
2
- const _async = {}
1
+ const topics: any = {}
2
+ const _async: any = {}
3
3
 
4
4
  export const publish = (name, params) => {
5
5
  _async[name] = Object.assign({}, _async[name], params)
@@ -13,13 +13,8 @@ export const subscribe = (name, method) => {
13
13
  if (name in _async) {
14
14
  method(_async[name])
15
15
  }
16
- }
17
-
18
- export const unsubscribe = (topic) => {
19
- topics[topic.name] = (topics[topic.name] || [])
20
- .filter(t => t != topic.method)
21
- if (!topics[topic.name].length) {
22
- delete topics[topic.name]
23
- delete _async[topic.name]
16
+ return () => {
17
+ topics[name] = topics[name].filter( fn => fn != method )
24
18
  }
25
19
  }
20
+
package/tsconfig.json CHANGED
@@ -1,16 +1,106 @@
1
1
  {
2
- "compilerOptions": {
3
- "baseUrl": "./src",
4
- "outDir": "./dist/",
5
- "target": "es6",
6
- "allowJs": true,
7
- "moduleResolution": "node",
8
- "allowSyntheticDefaultImports": true,
9
- "lib": [
10
- "dom"
11
- ]
12
- },
13
- "exclude": [
14
- "./node_modules"
2
+ "compilerOptions": {
3
+ /* Visit https://aka.ms/tsconfig to read more about this file */
4
+
5
+ /* Projects */
6
+ // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
7
+ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8
+ // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
9
+ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
10
+ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
11
+ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12
+
13
+ /* Language and Environment */
14
+ "target": "ES2015", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
15
+ "lib": ["es2015", "dom"], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
16
+ // "jsx": "preserve", /* Specify what JSX code is generated. */
17
+ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
18
+ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
19
+ // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
20
+ // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
21
+ // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
22
+ // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
23
+ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
24
+ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
25
+ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
26
+
27
+ /* Modules */
28
+ "module":"CommonJS", /* Specify what module code is generated. */
29
+ // "rootDir": "./src", /* Specify the root folder within your source files. */
30
+ "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
31
+ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
32
+ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
33
+ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
34
+ // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
35
+ // "types": [], /* Specify type package names to be included without being referenced in a source file. */
36
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
37
+ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
38
+ // "resolveJsonModule": true, /* Enable importing .json files. */
39
+ // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
40
+
41
+ /* JavaScript Support */
42
+ // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
43
+ // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
44
+ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
45
+
46
+ /* Emit */
47
+ "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
48
+ // "declarationMap": true, /* Create sourcemaps for d.ts files. */
49
+ "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
50
+ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
51
+ // "outFile": "types/index.d.ts", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
52
+ "outDir": "types", /* Specify an output folder for all emitted files. */
53
+ // "removeComments": true, /* Disable emitting comments. */
54
+ // "noEmit": true, /* Disable emitting files from a compilation. */
55
+ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
56
+ // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
57
+ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
58
+ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
59
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
60
+ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
61
+ // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
62
+ // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
63
+ // "newLine": "crlf", /* Set the newline character for emitting files. */
64
+ // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
65
+ // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
66
+ // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
67
+ // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
68
+ // "declarationDir": "./dist/types", /* Specify the output directory for generated declaration files. */
69
+ // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
70
+
71
+ /* Interop Constraints */
72
+ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
73
+ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
74
+ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
75
+ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
76
+ "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
77
+
78
+ /* Type Checking */
79
+ // "strict": true, /* Enable all strict type-checking options. */
80
+ "noImplicitAny": false, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
81
+ // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
82
+ // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
83
+ // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
84
+ // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
85
+ // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
86
+ // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
87
+ // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
88
+ // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
89
+ // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
90
+ // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
91
+ // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
92
+ // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
93
+ // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
94
+ // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
95
+ // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
96
+ // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
97
+ // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
98
+
99
+ /* Completeness */
100
+ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
101
+ "skipLibCheck": true /* Skip type checking all .d.ts files. */
102
+ },
103
+ "files": [
104
+ "src/index.ts"
15
105
  ]
16
106
  }
@@ -0,0 +1,32 @@
1
+ export default function Component(elm: any, { module, dependencies, templates, components }: {
2
+ module: any;
3
+ dependencies: any;
4
+ templates: any;
5
+ components: any;
6
+ }): {
7
+ base: {
8
+ template: any;
9
+ elm: any;
10
+ dependencies: any;
11
+ publish: (name: any, params: any) => void;
12
+ subscribe: (name: any, method: any) => () => void;
13
+ main(fn: any): void;
14
+ unmount(fn: any): void;
15
+ onupdate(fn: any): void;
16
+ on(eventName: any, selectorOrCallback: any, callback: any): void;
17
+ off(eventName: any, callback: any): void;
18
+ trigger(eventName: any, target: any, args: any): void;
19
+ emit: (...args: any[]) => void;
20
+ state: {
21
+ set(data: any): Promise<unknown>;
22
+ get(): any;
23
+ };
24
+ render(data?: any): void;
25
+ };
26
+ options: {
27
+ main: (a: any) => any;
28
+ unmount: (a: any) => any;
29
+ onupdate: (a: any) => any;
30
+ view: any;
31
+ };
32
+ };