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 {LogLevel, LogFilter} from "./LogFilter.js";
|
||||
import {LogLevel, LogFilter} from "./LogFilter";
|
||||
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
|
||||
limitations under the License.
|
||||
*/
|
||||
import {BaseLogger} from "./BaseLogger.js";
|
||||
import {BaseLogger} from "./BaseLogger";
|
||||
|
||||
export class ConsoleLogger extends BaseLogger {
|
||||
_persistItem(item) {
|
||||
|
|
|
@ -22,7 +22,7 @@ import {
|
|||
iterateCursor,
|
||||
fetchResults,
|
||||
} from "../matrix/storage/idb/utils";
|
||||
import {BaseLogger} from "./BaseLogger.js";
|
||||
import {BaseLogger} from "./BaseLogger";
|
||||
|
||||
export class IDBLogger extends BaseLogger {
|
||||
constructor(options) {
|
||||
|
|
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import {BaseLogger} from "./BaseLogger";
|
||||
import {LogLevel, LogFilter} from "./LogFilter.js";
|
||||
import {LogLevel, LogFilter} from "./LogFilter";
|
||||
|
||||
type LogItemValues = {l: string; [key: string]: unknown};
|
||||
export type LabelOrValues = string | LogItemValues;
|
||||
|
@ -84,14 +84,14 @@ export class LogItem {
|
|||
}
|
||||
}
|
||||
|
||||
durationWithoutType(type) {
|
||||
durationWithoutType(type: string) {
|
||||
if (this.duration) {
|
||||
return this.duration - this.durationOfType(type);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
durationOfType(type) {
|
||||
durationOfType(type: string) {
|
||||
if (this._values.t === type) {
|
||||
return this.duration;
|
||||
} 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
|
||||
limitations under the License.
|
||||
*/
|
||||
import {LogLevel} from "./LogFilter.js";
|
||||
import {LogLevel} from "./LogFilter";
|
||||
|
||||
function noop () {}
|
||||
|
||||
|
|
Loading…
Reference in a new issue