Fix imports and add type annotations

This commit is contained in:
RMidhunSuresh 2021-11-10 12:36:56 +05:30
parent 772f7a2757
commit ceb52eedaf
5 changed files with 7 additions and 7 deletions

View file

@ -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";

View file

@ -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) {

View file

@ -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) {

View file

@ -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) {

View file

@ -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 () {}