src/vs/workbench/common/editor.ts/EditorInputFactoryRegistry/registerEditorInputSerializer
class EditorInputFactoryRegistry:	registerEditorInputSerializer(editorInputTypeId: string, ctor: IConstructorSignature0<IEditorInputSerializer>): IDisposable {
		if (this.editorInputSerializerConstructors.has(editorInputTypeId) || this.editorInputSerializerInstances.has(editorInputTypeId)) {
			throw new Error(`A editor input serializer with type ID '${editorInputTypeId}' was already registered.`);
		}

		if (!this.instantiationService) {
			this.editorInputSerializerConstructors.set(editorInputTypeId, ctor);
		} else {
			this.createEditorInputSerializer(editorInputTypeId, ctor, this.instantiationService);
		}

		return toDisposable(() => {
			this.editorInputSerializerConstructors.delete(editorInputTypeId);
			this.editorInputSerializerInstances.delete(editorInputTypeId);
		});
	}