forked from mystiq/hydrogen-web
Fix imports and add type annotations
This commit is contained in:
parent
772f7a2757
commit
ceb52eedaf
5 changed files with 7 additions and 7 deletions
|
@ -16,7 +16,7 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {LogItem, LabelOrValues, FilterCreator, LogCallback} from "./LogItem";
|
import {LogItem, LabelOrValues, FilterCreator, LogCallback} from "./LogItem";
|
||||||
import {LogLevel, LogFilter} from "./LogFilter.js";
|
import {LogLevel, LogFilter} from "./LogFilter";
|
||||||
import {Platform} from "../platform/web/Platform.js";
|
import {Platform} from "../platform/web/Platform.js";
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
import {BaseLogger} from "./BaseLogger.js";
|
import {BaseLogger} from "./BaseLogger";
|
||||||
|
|
||||||
export class ConsoleLogger extends BaseLogger {
|
export class ConsoleLogger extends BaseLogger {
|
||||||
_persistItem(item) {
|
_persistItem(item) {
|
||||||
|
|
|
@ -22,7 +22,7 @@ import {
|
||||||
iterateCursor,
|
iterateCursor,
|
||||||
fetchResults,
|
fetchResults,
|
||||||
} from "../matrix/storage/idb/utils";
|
} from "../matrix/storage/idb/utils";
|
||||||
import {BaseLogger} from "./BaseLogger.js";
|
import {BaseLogger} from "./BaseLogger";
|
||||||
|
|
||||||
export class IDBLogger extends BaseLogger {
|
export class IDBLogger extends BaseLogger {
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
|
|
|
@ -16,7 +16,7 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {BaseLogger} from "./BaseLogger";
|
import {BaseLogger} from "./BaseLogger";
|
||||||
import {LogLevel, LogFilter} from "./LogFilter.js";
|
import {LogLevel, LogFilter} from "./LogFilter";
|
||||||
|
|
||||||
type LogItemValues = {l: string; [key: string]: unknown};
|
type LogItemValues = {l: string; [key: string]: unknown};
|
||||||
export type LabelOrValues = string | LogItemValues;
|
export type LabelOrValues = string | LogItemValues;
|
||||||
|
@ -84,14 +84,14 @@ export class LogItem {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
durationWithoutType(type) {
|
durationWithoutType(type: string) {
|
||||||
if (this.duration) {
|
if (this.duration) {
|
||||||
return this.duration - this.durationOfType(type);
|
return this.duration - this.durationOfType(type);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
durationOfType(type) {
|
durationOfType(type: string) {
|
||||||
if (this._values.t === type) {
|
if (this._values.t === type) {
|
||||||
return this.duration;
|
return this.duration;
|
||||||
} else if (this._children) {
|
} else if (this._children) {
|
||||||
|
|
|
@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
import {LogLevel} from "./LogFilter.js";
|
import {LogLevel} from "./LogFilter";
|
||||||
|
|
||||||
function noop () {}
|
function noop () {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue