diff --git a/types/wordpress__block-serialization-default-parser/index.d.ts b/types/wordpress__block-serialization-default-parser/index.d.ts new file mode 100644 index 0000000000..fdc94900cf --- /dev/null +++ b/types/wordpress__block-serialization-default-parser/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for @wordpress/block-serialization-default-parser 3.2 +// Project: https://github.com/WordPress/gutenberg/tree/master/packages/block-serialization-default-parser/README.md +// Definitions by: Derek Sifford +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.5 + +export * from '@wordpress/block-serialization-spec-parser'; diff --git a/types/wordpress__block-serialization-default-parser/tsconfig.json b/types/wordpress__block-serialization-default-parser/tsconfig.json new file mode 100644 index 0000000000..b598e5c829 --- /dev/null +++ b/types/wordpress__block-serialization-default-parser/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "paths": { + "@wordpress/block-serialization-default-parser": ["wordpress__block-serialization-default-parser"], + "@wordpress/block-serialization-spec-parser": ["wordpress__block-serialization-spec-parser"] + } + }, + "files": ["index.d.ts", "wordpress__block-serialization-default-parser-tests.ts"] +} diff --git a/types/wordpress__block-serialization-default-parser/tslint.json b/types/wordpress__block-serialization-default-parser/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/wordpress__block-serialization-default-parser/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/wordpress__block-serialization-default-parser/wordpress__block-serialization-default-parser-tests.ts b/types/wordpress__block-serialization-default-parser/wordpress__block-serialization-default-parser-tests.ts new file mode 100644 index 0000000000..7af9be06ff --- /dev/null +++ b/types/wordpress__block-serialization-default-parser/wordpress__block-serialization-default-parser-tests.ts @@ -0,0 +1,4 @@ +import { parse } from '@wordpress/block-serialization-default-parser'; + +// $ExpectType readonly Block[] +parse('hello world');