import { type Diary, type Reporter, type LogLevels, type LogEvent, diary, enable, } from 'diary'; declare function assert(thing: T): void; let scope = diary('name'); enable('*'); assert(scope); assert(enable); scope.info('string'); scope.info(1); scope.info([]); scope.info({}); scope.info('string', {}); scope.info(new Error()); scope.fatal(new Error()); scope.warn(new Error()); diary('name'); // @ts-expect-error diary({}); const reporter: Reporter = (event) => { assert(event); assert(event.name); assert(event.messages); assert(event.level); assert(event.blah); // allows other things }; diary('name', reporter);