Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

chore(types): split out config interface from configParser #3321

Merged
merged 1 commit into from
Jul 6, 2016

Conversation

cnishina
Copy link
Member

@cnishina cnishina commented Jul 1, 2016

  • split out config interface from configParser
  • add comments from docs/referenceConf.js to lib/config.ts
  • allows for users to import {Config} from 'protractor';

@@ -86,6 +86,10 @@ gulp.task('types', function(done) {

// write contents to 'built/index.d.ts'
fs.writeFileSync(outputFile, contents);

// copy over config.ts file so users just need to import from 'protractor/config';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be called config.ts then?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, why does this work for globals.d.ts without moving in to the root folder?

Copy link
Member Author

@cnishina cnishina Jul 1, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. My comment should say import {Config} from 'protractor/configuration'; instead...but we could also do import {Config} from 'protractor/config';
  2. /lib/globals.d.ts is only for protractor internals to set up global variables / fix some of the missing interfaces. /globals.ts exports variables from variables in the global namespace. So users can do import {browser} from 'protractor/globals';

@juliemr
Copy link
Member

juliemr commented Jul 1, 2016

Mostly looks good except for some (probably silly) questions about where files go.

@cnishina cnishina force-pushed the typings_config branch 2 times, most recently from 2240366 to ae25d24 Compare July 1, 2016 18:59
- split out config interface from configParser
- add comments from docs/referenceConf.js to lib/config.ts
- allows for users to `import {Config} from 'protractor';`
@juliemr juliemr assigned cnishina and unassigned juliemr Jul 6, 2016
@cnishina cnishina merged commit 1e9f500 into angular:master Jul 6, 2016
@cnishina cnishina deleted the typings_config branch July 8, 2016 18:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants