@@ -27,10 +27,7 @@ import { inputManager } from "./../../Services/InputManager"
2727import * as LanguageManager from "./../../Services/Language"
2828import { getTutorialManagerInstance } from "./../../Services/Learning"
2929import { getInstance as getAchievementsInstance } from "./../../Services/Learning/Achievements"
30- import {
31- getInstance as getMenuManagerInstance ,
32- IMenuOptionWithHighlights ,
33- } from "./../../Services/Menu"
30+ import { getInstance as getMenuManagerInstance } from "./../../Services/Menu"
3431import { getInstance as getFiltersInstance } from "./../../Services/Menu/Filter"
3532import { getInstance as getNotificationsInstance } from "./../../Services/Notifications"
3633import { getInstance as getOverlayInstance } from "./../../Services/Overlay"
@@ -47,35 +44,8 @@ import { Search } from "./../../Services/Search/SearchProvider"
4744
4845import * as throttle from "lodash/throttle"
4946
50- import { ISearch } from "./Search" // TODO: Move to oni-api
51-
5247const react = require ( "react" ) // tslint:disable-line no-var-requires
5348
54- // TODO: Move to oni-api
55- export interface QuickFixEntry {
56- filename : string
57- lnum : number
58- col : number
59- text : string
60- }
61-
62- // TODO: Move to oni-api under `menu`
63- export type IMenuFilter = ( options : any [ ] , searchString : string ) => IMenuOptionWithHighlights [ ]
64-
65- // TODO: Move to oni-api under `menu`
66- export interface IMenuFilters {
67- getDefault ( ) : IMenuFilter
68- getByName ( name : string ) : IMenuFilter
69- }
70-
71- export interface ApiNext {
72- search : ISearch
73- ui : Ui
74- filter : IMenuFilters // TODO: Move to oni-api under menu
75-
76- populateQuickFix ( entries : QuickFixEntry [ ] ) : void
77- }
78-
7949export class Dependencies {
8050 public get React ( ) : any {
8151 return react
@@ -89,7 +59,7 @@ const helpers = {
8959/**
9060 * API instance for interacting with OniApi (and vim)
9161 */
92- export class Oni implements OniApi . Plugin . Api , ApiNext {
62+ export class Oni implements OniApi . Plugin . Api {
9363 private _dependencies : Dependencies
9464 private _ui : Ui
9565 private _services : Services
@@ -158,7 +128,7 @@ export class Oni implements OniApi.Plugin.Api, ApiNext {
158128 return getMenuManagerInstance ( )
159129 }
160130
161- public get filter ( ) : IMenuFilters {
131+ public get filter ( ) : OniApi . Menu . IMenuFilters {
162132 return getFiltersInstance ( "" ) // TODO: Pass either "core" or plugin's name
163133 }
164134
@@ -218,7 +188,7 @@ export class Oni implements OniApi.Plugin.Api, ApiNext {
218188 return helpers
219189 }
220190
221- public get search ( ) : ISearch {
191+ public get search ( ) : OniApi . Search . ISearch {
222192 return new Search ( )
223193 }
224194
@@ -228,7 +198,7 @@ export class Oni implements OniApi.Plugin.Api, ApiNext {
228198 this . _services = new Services ( )
229199 }
230200
231- public populateQuickFix ( entries : QuickFixEntry [ ] ) : void {
201+ public populateQuickFix ( entries : OniApi . QuickFixEntry [ ] ) : void {
232202 const neovim : any = editorManager . activeEditor . neovim
233203 neovim . quickFix . setqflist ( entries , "Search Results" )
234204 neovim . command ( ":copen" )
0 commit comments