mirror of
https://github.com/svg/svgo.git
synced 2026-01-27 07:02:06 +03:00
17 lines
475 B
TypeScript
17 lines
475 B
TypeScript
import { expectType, expectAssignable } from 'tsd';
|
|
import {
|
|
type Config,
|
|
type DataUri,
|
|
type Output,
|
|
loadConfig,
|
|
optimize,
|
|
} from '../../types/lib/svgo-node.js';
|
|
|
|
expectType<Output>(optimize('<svg></svg>'));
|
|
expectAssignable<DataUri>('enc');
|
|
|
|
expectType<Promise<Config | null>>(loadConfig());
|
|
expectType<Promise<Config | null>>(loadConfig(undefined));
|
|
expectType<Promise<Config | null>>(loadConfig(null));
|
|
expectType<Promise<Config>>(loadConfig('svgo.config.js'));
|