@odoo/owl 3.0.0-alpha.22 → 3.0.0-alpha.24

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.
@@ -1,3 +1,4 @@
1
+ import { Component } from "./component";
1
2
  import { ReactiveValue } from "./reactivity/computations";
2
3
  type Constructor<T = any> = {
3
4
  new (...args: any[]): T;
@@ -18,6 +19,10 @@ export type KeyedObject<K extends string[]> = {
18
19
  type ResolveShapedObject<T extends {}> = PrettifyShape<ResolveOptionalEntries<T>>;
19
20
  export type ResolveObjectType<T extends {}> = ResolveShapedObject<T extends string[] ? KeyedObject<T> : T>;
20
21
  type UnionToIntersection<U> = (U extends any ? (_: U) => any : never) extends (_: infer I) => void ? I : never;
22
+ declare function anyType(): any;
23
+ declare function booleanType(): boolean;
24
+ declare function numberType(): number;
25
+ declare function stringType(): string;
21
26
  declare function arrayType(): any[];
22
27
  declare function arrayType<T>(elementType: T): T[];
23
28
  declare function constructorType<T extends Constructor>(constructor: T): T;
@@ -43,19 +48,21 @@ declare function tuple<const T extends any[]>(types: T): T;
43
48
  declare function union<T extends any[]>(types: T): T[number];
44
49
  declare function reactiveValueType(): ReactiveValue<any>;
45
50
  declare function reactiveValueType<T>(type: T): ReactiveValue<T>;
51
+ declare function componentType(): typeof Component;
46
52
  declare function ref(): HTMLElement | null;
47
53
  declare function ref<T extends Constructor<HTMLElement>>(type: T): InstanceType<T> | null;
48
54
  export declare const types: {
49
55
  and: typeof intersection;
50
- any: any;
56
+ any: typeof anyType;
51
57
  array: typeof arrayType;
52
- boolean: boolean;
58
+ boolean: typeof booleanType;
59
+ component: typeof componentType;
53
60
  constructor: typeof constructorType;
54
61
  customValidator: typeof customValidator;
55
62
  function: typeof functionType;
56
63
  instanceOf: typeof instanceType;
57
64
  literal: typeof literalType;
58
- number: number;
65
+ number: typeof numberType;
59
66
  object: typeof objectType;
60
67
  or: typeof union;
61
68
  promise: typeof promiseType;
@@ -64,7 +71,7 @@ export declare const types: {
64
71
  selection: typeof literalSelection;
65
72
  signal: typeof reactiveValueType;
66
73
  strictObject: typeof strictObjectType;
67
- string: string;
74
+ string: typeof stringType;
68
75
  tuple: typeof tuple;
69
76
  };
70
77
  export {};
@@ -1 +1 @@
1
- export declare const version = "3.0.0-alpha.22";
1
+ export declare const version = "3.0.0-alpha.24";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odoo/owl",
3
- "version": "3.0.0-alpha.22",
3
+ "version": "3.0.0-alpha.24",
4
4
  "description": "Odoo Web Library (OWL)",
5
5
  "main": "dist/owl.cjs.js",
6
6
  "module": "dist/owl.es.js",
@@ -40,6 +40,7 @@
40
40
  "preplayground:watch": "npm run build",
41
41
  "playground:watch": "npm-run-all --parallel playground:serve \"build:* -- --watch\"",
42
42
  "prettier": "prettier {src/*.ts,src/**/*.ts,tests/*.ts,tests/**/*.ts,doc/*.md,doc/**/*.md,tools/devtools/**/*.js} --write",
43
+ "prettier-fast": "git diff-tree --no-commit-id --name-only -r HEAD --diff-filter=d | xargs prettier --write",
43
44
  "check-formatting": "prettier {src/*.ts,src/**/*.ts,tests/*.ts,tests/**/*.ts,doc/*.md,doc/**/*.md,tools/devtools/**/*.js} --check",
44
45
  "lint": "eslint src/**/*.ts tests/**/*.ts",
45
46
  "release": "node tools/release.cjs",